类 StandardServletEnvironment

java.lang.Object
cn.taketoday.core.env.AbstractEnvironment
cn.taketoday.core.env.StandardEnvironment
cn.taketoday.web.servlet.support.StandardServletEnvironment
所有已实现的接口:
cn.taketoday.core.env.ConfigurableEnvironment, cn.taketoday.core.env.ConfigurablePropertyResolver, cn.taketoday.core.env.Environment, cn.taketoday.core.env.IterablePropertyResolver, cn.taketoday.core.env.PropertyResolver, ConfigurableWebEnvironment, Iterable<String>

public class StandardServletEnvironment extends cn.taketoday.core.env.StandardEnvironment implements ConfigurableWebEnvironment
Environment implementation to be used by Servlet-based web applications. All web-related (servlet-based) ApplicationContext classes initialize an instance by default.

Contributes ServletConfig, ServletContext, and JNDI-based PropertySource instances. See customizePropertySources(cn.taketoday.core.env.PropertySources) method documentation for details.

从以下版本开始:
4.0
作者:
Chris Beams, Juergen Hoeller
另请参阅:
  • StandardEnvironment
  • 字段概要

    字段
    修饰符和类型
    字段
    说明
    static final String
    JNDI property source name: "jndiProperties".
    private static final boolean
     
    static final String
    Servlet config init parameters property source name: "servletConfigInitParams".
    static final String
    Servlet context init parameters property source name: "servletContextInitParams".

    从类继承的字段 cn.taketoday.core.env.StandardEnvironment

    SYSTEM_ENVIRONMENT_PROPERTY_SOURCE_NAME, SYSTEM_PROPERTIES_PROPERTY_SOURCE_NAME

    从接口继承的字段 cn.taketoday.core.env.Environment

    DEFAULT_PROFILE, ENVIRONMENT_BEAN_NAME, KEY_ACTIVE_PROFILES, KEY_DEFAULT_PROFILES, KEY_IGNORE_GETENV, SYSTEM_ENVIRONMENT_BEAN_NAME, SYSTEM_PROPERTIES_BEAN_NAME
  • 构造器概要

    构造器
    限定符
    构造器
    说明
     
    Create a new StandardServletEnvironment instance.
    protected
    StandardServletEnvironment(cn.taketoday.core.env.PropertySources propertySources)
    Create a new StandardServletEnvironment instance with a specific PropertySources instance.
  • 方法概要

    修饰符和类型
    方法
    说明
    protected void
    customizePropertySources(cn.taketoday.core.env.PropertySources propertySources)
    Customize the set of property sources with those contributed by superclasses as well as those appropriate for standard servlet-based environments: "servletConfigInitParams" "servletContextInitParams" "jndiProperties"
    void
    initPropertySources(ServletContext servletContext, ServletConfig servletConfig)
    Replace any stub property source instances acting as placeholders with real servlet context/config property sources using the given parameters.

    从类继承的方法 cn.taketoday.core.env.AbstractEnvironment

    acceptsProfiles, addActiveProfile, addRequiredProperties, containsProperty, createPropertyResolver, doGetActiveProfiles, doGetActiveProfilesProperty, doGetDefaultProfiles, doGetDefaultProfilesProperty, getActiveProfiles, getConversionService, getDefaultProfiles, getProperty, getProperty, getProperty, getProperty, getPropertyResolver, getPropertySources, getRequiredProperty, getRequiredProperty, getReservedDefaultProfiles, getSystemEnvironment, getSystemProperties, isProfileActive, iterator, merge, resolvePlaceholders, resolveRequiredPlaceholders, setActiveProfiles, setConversionService, setDefaultProfiles, setIgnoreUnresolvableNestedPlaceholders, setPlaceholderPrefix, setPlaceholderSuffix, setRequiredProperties, setValueSeparator, suppressGetenvAccess, toString, validateProfile, validateRequiredProperties

    从类继承的方法 java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    从接口继承的方法 cn.taketoday.core.env.ConfigurableEnvironment

    addActiveProfile, getPropertySources, getSystemEnvironment, getSystemProperties, merge, setActiveProfiles, setDefaultProfiles

    从接口继承的方法 cn.taketoday.core.env.ConfigurablePropertyResolver

    addRequiredProperties, getConversionService, setConversionService, setIgnoreUnresolvableNestedPlaceholders, setPlaceholderPrefix, setPlaceholderSuffix, setRequiredProperties, setValueSeparator, validateRequiredProperties

    从接口继承的方法 cn.taketoday.core.env.Environment

    acceptsProfiles, getActiveProfiles, getDefaultProfiles, matchesProfiles

    从接口继承的方法 java.lang.Iterable

    forEach, spliterator

    从接口继承的方法 cn.taketoday.core.env.PropertyResolver

    containsProperty, getFlag, getFlag, getProperty, getProperty, getProperty, getProperty, getRequiredProperty, getRequiredProperty, resolvePlaceholders, resolveRequiredPlaceholders
  • 字段详细资料

    • SERVLET_CONTEXT_PROPERTY_SOURCE_NAME

      public static final String SERVLET_CONTEXT_PROPERTY_SOURCE_NAME
      Servlet context init parameters property source name: "servletContextInitParams".
      另请参阅:
    • SERVLET_CONFIG_PROPERTY_SOURCE_NAME

      public static final String SERVLET_CONFIG_PROPERTY_SOURCE_NAME
      Servlet config init parameters property source name: "servletConfigInitParams".
      另请参阅:
    • JNDI_PROPERTY_SOURCE_NAME

      public static final String JNDI_PROPERTY_SOURCE_NAME
      JNDI property source name: "jndiProperties".
      另请参阅:
    • jndiPresent

      private static final boolean jndiPresent
  • 构造器详细资料

    • StandardServletEnvironment

      public StandardServletEnvironment()
      Create a new StandardServletEnvironment instance.
    • StandardServletEnvironment

      protected StandardServletEnvironment(cn.taketoday.core.env.PropertySources propertySources)
      Create a new StandardServletEnvironment instance with a specific PropertySources instance.
      参数:
      propertySources - property sources to use
  • 方法详细资料