org.springframework.beans.factory.config.BeanPostProcessor
implementation that passes the ServletContext to beans that implement
the ServletContextAware interface.
Web application contexts will automatically register this with their underlying bean factory. Applications do not use this directly.
org.springframework.web.context.ServletContextAware , org.springframework.web.context.support.XmlWebApplicationContext#postProcessBeanFactory
| Modifier and Type | Field and Description |
|---|---|
| private ServletConfig | |
| private ServletContext |
| Access | Constructor and Description |
|---|---|
| protected | ServletContextAwareProcessor()
Create a new ServletContextAwareProcessor without an initial context or config. |
| public | ServletContextAwareProcessor(ServletContext servletContext)
Create a new ServletContextAwareProcessor for the given context. |
| public | ServletContextAwareProcessor(ServletConfig servletConfig)
Create a new ServletContextAwareProcessor for the given config. |
| public | ServletContextAwareProcessor(ServletContext servletContext, ServletConfig servletConfig)
Create a new ServletContextAwareProcessor for the given context and config. |
| Modifier and Type | Method and Description |
|---|---|
| protected ServletConfig | |
| protected ServletContext | |
| public Object | postProcessAfterInitialization(Object
the new bean instance bean, String the name of the bean beanName)Overrides default org. BeanPostProcessor to the given new bean instance after any bean
initialization callbacks (like InitializingBean's afterPropertiesSet
or a custom init-method).
|
| public Object | postProcessBeforeInitialization(Object
the new bean instance bean, String the name of the bean beanName)Overrides default org. BeanPostProcessor to the given new bean instance before any bean
initialization callbacks (like InitializingBean's afterPropertiesSet
or a custom init-method).
|
| servletConfig | back to summary |
|---|---|
| private ServletConfig servletConfig
| |
| servletContext | back to summary |
|---|---|
| private ServletContext servletContext
| |
| ServletContextAwareProcessor | back to summary |
|---|---|
| protected ServletContextAwareProcessor() Create a new ServletContextAwareProcessor without an initial context or config.
When this constructor is used the | |
| ServletContextAwareProcessor | back to summary |
|---|---|
| public ServletContextAwareProcessor(ServletContext servletContext) Create a new ServletContextAwareProcessor for the given context. | |
| ServletContextAwareProcessor | back to summary |
|---|---|
| public ServletContextAwareProcessor(ServletConfig servletConfig) Create a new ServletContextAwareProcessor for the given config. | |
| ServletContextAwareProcessor | back to summary |
|---|---|
| public ServletContextAwareProcessor(ServletContext servletContext, ServletConfig servletConfig) Create a new ServletContextAwareProcessor for the given context and config. | |
| getServletConfig | back to summary |
|---|---|
| protected ServletConfig getServletConfig() Returns the
| |
| getServletContext | back to summary |
|---|---|
| protected ServletContext getServletContext() Returns the
| |
| postProcessAfterInitialization | back to summary |
|---|---|
| public Object postProcessAfterInitialization(Object bean, String beanName) Overrides default org. Doc from org. Apply this In case of a FactoryBean, this callback will be invoked for both the FactoryBean
instance and the objects created by the FactoryBean (as of Spring 2.0). The
post-processor can decide whether to apply to either the FactoryBean or created
objects or both through corresponding This callback will also be invoked after a short-circuiting triggered by a
The default implementation returns the given | |
| postProcessBeforeInitialization | back to summary |
|---|---|
| public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException Overrides default org. Doc from org. Apply this The default implementation returns the given
| |