|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.core.env.AbstractPropertyResolver org.springframework.core.env.PropertySourcesPropertyResolver
public class PropertySourcesPropertyResolver
PropertyResolver
implementation that resolves property values against
an underlying set of PropertySources
.
PropertySource
,
PropertySources
,
AbstractEnvironment
Field Summary |
---|
Fields inherited from class org.springframework.core.env.AbstractPropertyResolver |
---|
conversionService, logger |
Constructor Summary | |
---|---|
PropertySourcesPropertyResolver(PropertySources propertySources)
Create a new resolver against the given property sources. |
Method Summary | ||
---|---|---|
boolean |
containsProperty(String key)
Return whether the given property key is available for resolution, i.e., the value for the given key is not null . |
|
String |
getProperty(String key)
Return the property value associated with the given key, or null
if the key cannot be resolved. |
|
|
getProperty(String key,
Class<T> targetValueType)
Return the property value associated with the given key, or null
if the key cannot be resolved. |
|
|
getPropertyAsClass(String key,
Class<T> targetValueType)
Convert the property value associated with the given key to a Class
of type T or null if the key cannot be resolved. |
Methods inherited from class org.springframework.core.env.AbstractPropertyResolver |
---|
getConversionService, getProperty, getProperty, getRequiredProperty, getRequiredProperty, resolvePlaceholders, resolveRequiredPlaceholders, setConversionService, setPlaceholderPrefix, setPlaceholderSuffix, setRequiredProperties, setValueSeparator, validateRequiredProperties |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PropertySourcesPropertyResolver(PropertySources propertySources)
propertySources
- the set of PropertySource
objects to useMethod Detail |
---|
public boolean containsProperty(String key)
PropertyResolver
null
.
public String getProperty(String key)
PropertyResolver
null
if the key cannot be resolved.
key
- the property name to resolvePropertyResolver.getProperty(String, String)
,
PropertyResolver.getProperty(String, Class)
,
PropertyResolver.getRequiredProperty(String)
public <T> T getProperty(String key, Class<T> targetValueType)
PropertyResolver
null
if the key cannot be resolved.
key
- the property name to resolvePropertyResolver.getRequiredProperty(String, Class)
public <T> Class<T> getPropertyAsClass(String key, Class<T> targetValueType)
PropertyResolver
Class
of type T
or null
if the key cannot be resolved.
PropertyResolver.getProperty(String, Class)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |