类 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
另请参阅:
  • 字段详细资料

  • 构造器详细资料

    • ServletContextAwareProcessor

      protected ServletContextAwareProcessor()
      Create a new ServletContextAwareProcessor without an initial context or config. When this constructor is used the getServletContext() and/or getServletConfig() methods should be overridden.
    • ServletContextAwareProcessor

      public ServletContextAwareProcessor(ServletContext servletContext)
      Create a new ServletContextAwareProcessor for the given context.
    • ServletContextAwareProcessor

      public ServletContextAwareProcessor(ServletConfig servletConfig)
      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

      @Nullable protected ServletContext getServletContext()
      Returns the ServletContext to be injected or null. This method can be overridden by subclasses when a context is obtained after the post-processor has been registered.
    • getServletConfig

      @Nullable protected ServletConfig getServletConfig()
      Returns the ServletConfig to be injected or null. 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

      public Object postProcessAfterInitialization(Object bean, String beanName)
      指定者:
      postProcessAfterInitialization 在接口中 cn.taketoday.beans.factory.InitializationBeanPostProcessor