| |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Interface to be implemented by any object that wishes to be notified of the application context it runs in.
Implementing this interface makes sense when an object requires access to file resources, i.e. wants to call ApplicationContext.getResource, or access to the MessageSource. Configuration via bean references is preferable to implementing this interface just for bean lookup purposes.
Note that Resource dependencies can also be exposed as bean properties of type Resource, populated via Strings with automatic type conversion by the bean factory or via ResourceFactoryBean. This removes the need for implementing this interface just for resource access purposes.
ApplicationObjectSupport is a convenience base class for application objects, implementing this interface.
For a list of all bean lifecycle methods, see the BeanFactory javadocs.
| Method Summary | |
void | setApplicationContext(ApplicationContext context)Set the application context used by this object. |
| Method Detail |
public void setApplicationContext(ApplicationContext context)
throws org.springframework.beans.BeansException
Invoked after population of normal bean properties but before an init callback like InitializingBean's afterPropertiesSet or a custom init-method.
| |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||