类 ServletContextAwareProcessor
java.lang.Object
cn.taketoday.web.servlet.support.ServletContextAwareProcessor
- 所有已实现的接口:
cn.taketoday.beans.factory.config.BeanPostProcessor,cn.taketoday.beans.factory.InitializationBeanPostProcessor
public class ServletContextAwareProcessor
extends Object
implements cn.taketoday.beans.factory.InitializationBeanPostProcessor
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.
- 从以下版本开始:
- 4.0 2022/2/20 20:57
- 作者:
- Juergen Hoeller, Phillip Webb, Harry Yang
- 另请参阅:
-
字段概要
字段 -
构造器概要
构造器限定符构造器说明protectedCreate a new ServletContextAwareProcessor without an initial context or config.ServletContextAwareProcessor(ServletConfig servletConfig) Create a new ServletContextAwareProcessor for the given config.ServletContextAwareProcessor(ServletContext servletContext) Create a new ServletContextAwareProcessor for the given context.ServletContextAwareProcessor(ServletContext servletContext, ServletConfig servletConfig) Create a new ServletContextAwareProcessor for the given context and config. -
方法概要
修饰符和类型方法说明protected ServletConfigReturns theServletConfigto be injected ornull.protected ServletContextReturns theServletContextto be injected ornull.postProcessAfterInitialization(Object bean, String beanName) postProcessBeforeInitialization(Object bean, String beanName)
-
字段详细资料
-
servletContext
-
servletConfig
-
-
构造器详细资料
-
ServletContextAwareProcessor
protected ServletContextAwareProcessor()Create a new ServletContextAwareProcessor without an initial context or config. When this constructor is used thegetServletContext()and/orgetServletConfig()methods should be overridden. -
ServletContextAwareProcessor
Create a new ServletContextAwareProcessor for the given context. -
ServletContextAwareProcessor
Create a new ServletContextAwareProcessor for the given config. -
ServletContextAwareProcessor
public ServletContextAwareProcessor(@Nullable ServletContext servletContext, @Nullable ServletConfig servletConfig) Create a new ServletContextAwareProcessor for the given context and config.
-
-
方法详细资料
-
getServletContext
Returns theServletContextto be injected ornull. This method can be overridden by subclasses when a context is obtained after the post-processor has been registered. -
getServletConfig
Returns theServletConfigto be injected ornull. This method can be overridden by subclasses when a context is obtained after the post-processor has been registered. -
postProcessBeforeInitialization
public Object postProcessBeforeInitialization(Object bean, String beanName) throws cn.taketoday.beans.BeansException - 指定者:
postProcessBeforeInitialization在接口中cn.taketoday.beans.factory.InitializationBeanPostProcessor- 抛出:
cn.taketoday.beans.BeansException
-
postProcessAfterInitialization
- 指定者:
postProcessAfterInitialization在接口中cn.taketoday.beans.factory.InitializationBeanPostProcessor
-