类 ServletContextParameterFactoryBean

java.lang.Object
cn.taketoday.web.servlet.support.ServletContextParameterFactoryBean
所有已实现的接口:
cn.taketoday.beans.factory.Aware, cn.taketoday.beans.factory.FactoryBean<String>, ServletContextAware

public class ServletContextParameterFactoryBean extends Object implements cn.taketoday.beans.factory.FactoryBean<String>, ServletContextAware
FactoryBean that retrieves a specific ServletContext init parameter (that is, a "context-param" defined in web.xml). Exposes that ServletContext init parameter when used as bean reference, effectively making it available as named Framework bean instance.

NOTE: you may also use the "contextParameters" default bean which is of type Map, and dereference it using an "#{contextParameters.myKey}" expression to access a specific parameter by name.

从以下版本开始:
4.0
作者:
Juergen Hoeller
另请参阅:
  • 字段详细资料

    • initParamName

      @Nullable private String initParamName
    • paramValue

      @Nullable private String paramValue
  • 构造器详细资料

    • ServletContextParameterFactoryBean

      public ServletContextParameterFactoryBean()
  • 方法详细资料

    • setInitParamName

      public void setInitParamName(@Nullable String initParamName)
      Set the name of the ServletContext init parameter to expose.
    • setServletContext

      public void setServletContext(ServletContext servletContext)
      从接口复制的说明: ServletContextAware
      Set the ServletContext that this object runs in.

      Invoked after population of normal bean properties but before an init callback like InitializingBean's afterPropertiesSet or a custom init-method. Invoked after ApplicationContextAware's setApplicationContext.

      指定者:
      setServletContext 在接口中 ServletContextAware
      参数:
      servletContext - the ServletContext object to be used by this object
      另请参阅:
      • InitializingBean.afterPropertiesSet()
      • ApplicationContextAware.setApplicationContext(cn.taketoday.context.ApplicationContext)
    • getObject

      @Nullable public String getObject()
      指定者:
      getObject 在接口中 cn.taketoday.beans.factory.FactoryBean<String>
    • getObjectType

      public Class<String> getObjectType()
      指定者:
      getObjectType 在接口中 cn.taketoday.beans.factory.FactoryBean<String>
    • isSingleton

      public boolean isSingleton()
      指定者:
      isSingleton 在接口中 cn.taketoday.beans.factory.FactoryBean<String>