Package 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, aServletContext
-based property source must wait until theServletContext
object is available to its enclosingApplicationContext
. 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.
Nested Class Summary
Nested classes/interfaces inherited from class org.springframework.core.env.PropertySource
PropertySource.StubPropertySource
Field Summary
Fields inherited from class org.springframework.core.env.PropertySource
logger, name, source
Constructor Summary
Constructors Constructor Description StubPropertySource(String name)
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getProperty(String name)
Always returnsnull
.Methods inherited from class org.springframework.core.env.PropertySource
containsProperty, equals, getName, getSource, hashCode, named, toString
Constructor Detail
StubPropertySource
public StubPropertySource(String name)
Method Detail
getProperty
@Nullable public String getProperty(String name)
Always returnsnull
.- Specified by:
getProperty
in classPropertySource<Object>
- Parameters:
name
- the property to find- See Also:
PropertyResolver.getRequiredProperty(String)