diff --git a/spring-framework-reference/src/beans.xml b/spring-framework-reference/src/beans.xml index 03947fc81a9..f6a11e82d71 100644 --- a/spring-framework-reference/src/beans.xml +++ b/spring-framework-reference/src/beans.xml @@ -3667,6 +3667,115 @@ public final class Boot { InitializingBeans afterPropertiesSet or a custom init-method. + +
+ Other <interfacename>Aware</interfacename> interfaces + + Besides ApplicationContextAware and + BeanNameAware discussed above, Spring offers a range + of Aware interfaces that allow beans + to indicate to the container that they require a certain infrastructure dependency. + The most important Aware interfaces are summarized below - as a general rule, + the name is a good indication of the dependency type: + + + <interfacename>Aware</interfacename> interfaces + + + + + + + Name + Injected Dependency + Explained in... + + + + + + ApplicationContextAware + Declaring ApplicationContext + + + + ApplicationEventPublisherAware + Event publisher of the enclosing ApplicationContext + + + + BeanClassLoaderAware + Class loader used to load the bean classes. + + + + BeanFactoryAware + Declaring BeanFactory + + + + BeanNameAware + Name of the declaring bean + + + + BootstrapContextAware + Resource adapter BootstrapContext the container runs in. Typically available only + in JCA aware ApplicationContexts + + + + LoadTimeWeaverAware + Defined weaver for processing class definition at load time + + + + MessageSourceAware + Configured strategy for resolving messages (with support for parametrization and internationalization) + + + + NotificationPublisherAware + Spring JMX notification publisher + + + + PortletConfigAware + Current PortletConfig the container runs in. Valid only in a web-aware Spring + ApplicationContext + + + + PortletContextAware + Current PortletContext the container runs in. Valid only in a web-aware Spring + ApplicationContext + + + + ResourceLoaderAware + Configured loader for low-level access to resources + + + + ServletConfigAware + Current ServletConfig the container runs in. Valid only in a web-aware Spring + ApplicationContext + + + + ServletContextAware + Current ServletContext the container runs in. Valid only in a web-aware Spring + ApplicationContext + + + + +
+ + Note again that usage of these interfaces ties your code to the Spring API and does not follow the Inversion of Control + style. As such, they are recommended for infrastructure beans that require programmatic access to the container. + +