org.springframework.core.env
Class PropertySource.StubPropertySource
java.lang.Object
org.springframework.core.env.PropertySource<Object>
org.springframework.core.env.PropertySource.StubPropertySource
- Enclosing class:
- PropertySource<T>
public static class PropertySource.StubPropertySource
- extends PropertySource<Object>
PropertySource to be used as a placeholder in cases where an actual
property source cannot be eagerly initialized at application context
creation time. For example, a ServletContext-based property source
must wait until the ServletContext object is available to its enclosing
ApplicationContext. In such cases, a stub should be used to hold the
intended default position/order of the property source, then be replaced
during context refresh.
- See Also:
AbstractApplicationContext.initPropertySources(),
DefaultWebEnvironment,
ServletContextPropertySource
PropertySource.StubPropertySource
public PropertySource.StubPropertySource(String name)
getProperty
public String getProperty(String key)
- Description copied from class:
PropertySource
- Return the value associated with the given key,
null if not found.
- Specified by:
getProperty in class PropertySource<Object>
- Parameters:
key - the property key to find- See Also:
PropertyResolver.getRequiredProperty(String)