public class CompositePropertySource extends PropertySource<java.lang.Object>
PropertySource implementation that iterates over a set of
PropertySource instances. Necessary in cases where multiple property sources
share the same name, e.g. when multiple values are supplied to @PropertySource.PropertySource.StubPropertySourcelogger, name, source| Constructor and Description |
|---|
CompositePropertySource(java.lang.String name)
Create a new
CompositePropertySource. |
| Modifier and Type | Method and Description |
|---|---|
void |
addPropertySource(PropertySource<?> propertySource) |
java.lang.Object |
getProperty(java.lang.String name)
Return the value associated with the given name,
null if not found. |
java.lang.String |
toString()
Produce concise output (type and name) if the current log level does not include
debug.
|
containsProperty, equals, getName, getSource, hashCode, namedpublic CompositePropertySource(java.lang.String name)
CompositePropertySource.name - the name of the property sourcepublic java.lang.Object getProperty(java.lang.String name)
PropertySourcenull if not found.getProperty in class PropertySource<java.lang.Object>name - the property to findPropertyResolver.getRequiredProperty(String)public void addPropertySource(PropertySource<?> propertySource)
public java.lang.String toString()
PropertySourcetoString in class PropertySource<java.lang.Object>Log.isDebugEnabled()