Rename {DefaultWeb=>StandardServlet}Environment
Issue: SPR-8348
This commit is contained in:
@@ -205,7 +205,7 @@ public abstract class PropertySource<T> {
|
||||
* during context refresh.
|
||||
*
|
||||
* @see org.springframework.context.support.AbstractApplicationContext#initPropertySources()
|
||||
* @see org.springframework.web.context.support.DefaultWebEnvironment
|
||||
* @see org.springframework.web.context.support.StandardServletEnvironment
|
||||
* @see org.springframework.web.context.support.ServletContextPropertySource
|
||||
*/
|
||||
public static class StubPropertySource extends PropertySource<Object> {
|
||||
|
||||
@@ -17,27 +17,28 @@
|
||||
package org.springframework.core.env;
|
||||
|
||||
/**
|
||||
* Default implementation of the {@link Environment} interface. Used throughout all non-Web*
|
||||
* ApplicationContext implementations.
|
||||
* {@link Environment} implementation suitable for use in 'standard' (i.e. non-web)
|
||||
* applications.
|
||||
*
|
||||
* <p>In addition to the usual functions of a {@link ConfigurableEnvironment} such as property
|
||||
* resolution and profile-related operations, this implementation configures two default property
|
||||
* sources, to be searched in the following order:
|
||||
* <ol>
|
||||
* <p>In addition to the usual functions of a {@link ConfigurableEnvironment} such as
|
||||
* property resolution and profile-related operations, this implementation configures two
|
||||
* default property sources, to be searched in the following order:
|
||||
* <ul>
|
||||
* <li>{@linkplain AbstractEnvironment#getSystemProperties() system properties}
|
||||
* <li>{@linkplain AbstractEnvironment#getSystemEnvironment() system environment variables}
|
||||
* </ol>
|
||||
* </ul>
|
||||
*
|
||||
* That is, if the key "xyz" is present both in the JVM system properties as well as in the
|
||||
* set of environment variables for the current process, the value of key "xyz" from system properties
|
||||
* will return from a call to {@code environment.getProperty("xyz")}.
|
||||
* This ordering is chosen by default because system properties are per-JVM, while environment
|
||||
* variables may be the same across many JVMs on a given system. Giving system properties
|
||||
* precedence allows for overriding of environment variables on a per-JVM basis.
|
||||
* That is, if the key "xyz" is present both in the JVM system properties as well as in
|
||||
* the set of environment variables for the current process, the value of key "xyz" from
|
||||
* system properties * will return from a call to {@code environment.getProperty("xyz")}.
|
||||
* This ordering is chosen by default because system properties are per-JVM, while
|
||||
* environment variables may be the same across many JVMs on a given system. Giving
|
||||
* system properties precedence allows for overriding of environment variables on a
|
||||
* per-JVM basis.
|
||||
*
|
||||
* <p>These default property sources may be removed, reordered, or replaced; and additional
|
||||
* property sources may be added using the {@link MutablePropertySources} instance available
|
||||
* from {@link #getPropertySources()}.
|
||||
* <p>These default property sources may be removed, reordered, or replaced; and
|
||||
* additional property sources may be added using the {@link MutablePropertySources}
|
||||
* instance available from {@link #getPropertySources()}.
|
||||
*
|
||||
* <h4>Example: adding a new property source with highest search priority</h4>
|
||||
* <pre class="code">
|
||||
@@ -62,16 +63,17 @@ package org.springframework.core.env;
|
||||
* </pre>
|
||||
*
|
||||
* When an {@link Environment} is being used by an ApplicationContext, it is important
|
||||
* that any such PropertySource manipulations be performed <em>before</em> the context's {@link
|
||||
* org.springframework.context.support.AbstractApplicationContext#refresh() refresh()} method is
|
||||
* called. This ensures that all PropertySources are available during the container bootstrap process,
|
||||
* including use by {@link org.springframework.context.support.PropertySourcesPlaceholderConfigurer
|
||||
* that any such PropertySource manipulations be performed <em>before</em> the context's
|
||||
* {@link org.springframework.context.support.AbstractApplicationContext#refresh()
|
||||
* refresh()} method is called. This ensures that all PropertySources are available during
|
||||
* the container bootstrap process, including use by
|
||||
* {@link org.springframework.context.support.PropertySourcesPlaceholderConfigurer
|
||||
* property placeholder configurers}.
|
||||
*
|
||||
* @author Chris Beams
|
||||
* @since 3.1
|
||||
* @see ConfigurableEnvironment
|
||||
* @see org.springframework.web.context.support.DefaultWebEnvironment
|
||||
* @see org.springframework.web.context.support.StandardServletEnvironment
|
||||
*/
|
||||
public class StandardEnvironment extends AbstractEnvironment {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user