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 method
documentation for details.
StandardEnvironment
| Modifier and Type | Field and Description |
|---|---|
| public static final String | JNDI_PROPERTY_SOURCE_NAME
JNDI property source name: jndiProperties. |
| private static final boolean | |
| public static final String | SERVLET_CONFIG_PROPERTY_SOURCE_NAME
Servlet config init parameters property source name: servletConfigInitParams. |
| public static final String | SERVLET_CONTEXT_PROPERTY_SOURCE_NAME
Servlet context init parameters property source name: servletContextInitParams. |
| Access | Constructor and Description |
|---|---|
| public | |
| protected | StandardServletEnvironment(MutablePropertySources
property sources to use propertySources)Create a new |
| Modifier and Type | Method and Description |
|---|---|
| protected void | customizePropertySources(MutablePropertySources propertySources)
Overrides org.
|
| public void | initPropertySources(ServletContext
the servletContext, ServletConfig ServletContext (may not be null)the servletConfig)ServletConfig (null if not available)Implements org. |
| JNDI_PROPERTY_SOURCE_NAME | back to summary |
|---|---|
| public static final String JNDI_PROPERTY_SOURCE_NAME JNDI property source name: jndiProperties. | |
| jndiPresent | back to summary |
|---|---|
| private static final boolean jndiPresent | |
| SERVLET_CONFIG_PROPERTY_SOURCE_NAME | back to summary |
|---|---|
| public static final String SERVLET_CONFIG_PROPERTY_SOURCE_NAME Servlet config init parameters property source name: servletConfigInitParams. | |
| SERVLET_CONTEXT_PROPERTY_SOURCE_NAME | back to summary |
|---|---|
| public static final String SERVLET_CONTEXT_PROPERTY_SOURCE_NAME Servlet context init parameters property source name: servletContextInitParams. | |
| StandardServletEnvironment | back to summary |
|---|---|
| public StandardServletEnvironment() Create a new | |
| StandardServletEnvironment | back to summary |
|---|---|
| protected StandardServletEnvironment(MutablePropertySources propertySources) Create a new
| |
| customizePropertySources | back to summary |
|---|---|
| protected void customizePropertySources(MutablePropertySources propertySources) Overrides org. Customize the set of property sources with those contributed by superclasses as well as those appropriate for standard servlet-based environments:
Properties present in servletConfigInitParams will take precedence over those in servletContextInitParams, and properties found in either of the above take precedence over those found in jndiProperties. Properties in any of the above will take precedence over system properties and
environment variables contributed by the The Addition of jndiProperties can be disabled with
| |
| initPropertySources | back to summary |
|---|---|
| public void initPropertySources(ServletContext servletContext, ServletConfig servletConfig) Implements org. Doc from org. Replace any stub property source instances acting as placeholders with real servlet context/config property sources using the given parameters.
| |