public class StandardServletEnvironment extends StandardEnvironment implements ConfigurableWebEnvironment
Servlet ベースの Web アプリケーションで使用される Environment 実装。すべての Web 関連(サーブレットベース)の ApplicationContext クラスは、デフォルトでインスタンスを初期化します。ServletConfig、ServletContext、JNDI ベースの PropertySource インスタンスに貢献します。詳細については、customizePropertySources(org.springframework.core.env.MutablePropertySources) メソッドのドキュメントを参照してください。
StandardEnvironment| 修飾子と型 | フィールドと説明 |
|---|---|
static StringSE | JNDI_PROPERTY_SOURCE_NAMEJNDI プロパティソース名: "jndiProperties" |
static StringSE | SERVLET_CONFIG_PROPERTY_SOURCE_NAME サーブレット構成の初期化パラメータープロパティソース名: "servletConfigInitParams" |
static StringSE | SERVLET_CONTEXT_PROPERTY_SOURCE_NAME サーブレットコンテキストの初期化パラメータープロパティソース名: "servletContextInitParams" |
SYSTEM_ENVIRONMENT_PROPERTY_SOURCE_NAME, SYSTEM_PROPERTIES_PROPERTY_SOURCE_NAMEACTIVE_PROFILES_PROPERTY_NAME, DEFAULT_PROFILES_PROPERTY_NAME, IGNORE_GETENV_PROPERTY_NAME, logger, RESERVED_DEFAULT_PROFILE_NAME| コンストラクターと説明 |
|---|
StandardServletEnvironment() |
| 修飾子と型 | メソッドと説明 |
|---|---|
protected void | customizePropertySources(MutablePropertySources propertySources) プロパティソースのセットを、スーパークラスによって提供されたもの、標準のサーブレットベースの環境に適したものでカスタマイズします。"servletConfigInitParams" "servletContextInitParams" "jndiProperties" |
void | initPropertySources(ServletContextEE servletContext, ServletConfigEE servletConfig) 指定されたパラメーターを使用して、プレースホルダーとして機能するスタブプロパティソースインスタンスを実際のサーブレットコンテキスト / 構成プロパティソースに置き換えます。 |
acceptsProfiles, addActiveProfile, containsProperty, doGetActiveProfiles, doGetDefaultProfiles, getActiveProfiles, getConversionService, getDefaultProfiles, getProperty, getProperty, getProperty, getProperty, getPropertyAsClass, getPropertySources, getRequiredProperty, getRequiredProperty, getReservedDefaultProfiles, getSystemEnvironment, getSystemProperties, isProfileActive, merge, resolvePlaceholders, resolveRequiredPlaceholders, setActiveProfiles, setConversionService, setDefaultProfiles, setIgnoreUnresolvableNestedPlaceholders, setPlaceholderPrefix, setPlaceholderSuffix, setRequiredProperties, setValueSeparator, suppressGetenvAccess, toString, validateProfile, validateRequiredPropertiescloneSE, equalsSE, finalizeSE, getClassSE, hashCodeSE, notifySE, notifyAllSE, waitSE, waitSE, waitSEaddActiveProfile, getPropertySources, getSystemEnvironment, getSystemProperties, merge, setActiveProfiles, setDefaultProfilesacceptsProfiles, getActiveProfiles, getDefaultProfilesgetConversionService, setConversionService, setIgnoreUnresolvableNestedPlaceholders, setPlaceholderPrefix, setPlaceholderSuffix, setRequiredProperties, setValueSeparator, validateRequiredPropertiescontainsProperty, getProperty, getProperty, getProperty, getProperty, getPropertyAsClass, getRequiredProperty, getRequiredProperty, resolvePlaceholders, resolveRequiredPlaceholderspublic static final StringSE SERVLET_CONTEXT_PROPERTY_SOURCE_NAME
public static final StringSE SERVLET_CONFIG_PROPERTY_SOURCE_NAME
protected void customizePropertySources(MutablePropertySources propertySources)
"servletConfigInitParams" にあるプロパティは "servletContextInitParams" にあるプロパティよりも優先され、上記のいずれかにあるプロパティは "jndiProperties" にあるプロパティよりも優先されます。
上記のいずれかのプロパティは、StandardEnvironment スーパークラスによって提供されるシステムプロパティおよび環境変数よりも優先されます。
Servlet 関連のプロパティソースはこの段階で stubs として追加され、実際の ServletContextEE オブジェクトが利用可能になると完全に初期化されます。
StandardEnvironment の customizePropertySources StandardEnvironment.customizePropertySources(org.springframework.core.env.MutablePropertySources), AbstractEnvironment.customizePropertySources(org.springframework.core.env.MutablePropertySources), ServletConfigPropertySource, ServletContextPropertySource, JndiPropertySource, AbstractApplicationContext.initPropertySources(), initPropertySources(ServletContext, ServletConfig)public void initPropertySources(ServletContextEE servletContext, ServletConfigEE servletConfig)
ConfigurableWebEnvironmentConfigurableWebEnvironment の initPropertySources servletContext - ServletContextEE (null でない可能性があります)servletConfig - ServletConfigEE (利用できない場合は null )WebApplicationContextUtils.initServletPropertySources( org.springframework.core.env.MutablePropertySources, ServletContext, ServletConfig)