org.springframework.core.env
Class PropertySource.StubPropertySource
java.lang.Object
org.springframework.core.env.PropertySource<java.lang.Object>
org.springframework.core.env.PropertySource.StubPropertySource
- Direct Known Subclasses:
- PropertySource.ComparisonPropertySource
- Enclosing class:
- PropertySource<T>
public static class PropertySource.StubPropertySource
- extends PropertySource<java.lang.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()
,
StandardServletEnvironment
,
ServletContextPropertySource
Method Summary |
java.lang.String |
getProperty(java.lang.String name)
Always return null . |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
PropertySource.StubPropertySource
public PropertySource.StubPropertySource(java.lang.String name)
getProperty
public java.lang.String getProperty(java.lang.String name)
- Always return
null
.
- Specified by:
getProperty
in class PropertySource<java.lang.Object>
- Parameters:
name
- the property to find- See Also:
PropertyResolver.getRequiredProperty(String)