PropertyResolver implementation that resolves property values against
an underlying set of PropertySources.
PropertySource, PropertySources, AbstractEnvironment
| Modifier and Type | Field and Description |
|---|---|
| private final PropertySources |
| Access | Constructor and Description |
|---|---|
| public | PropertySourcesPropertyResolver(PropertySources
the set of propertySources)PropertySource objects to useCreate a new resolver against the given property sources. |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | containsProperty(String key)
Overrides org. Implements org. Return whether the given property key is available for resolution,
i.e. if the value for the given key is not |
| public String | getProperty(String
the property name to resolve key)Overrides org. Implements org. Return the property value associated with the given key,
or |
| public <T> T | getProperty(String
the property name to resolve key, Class<T> the expected type of the property value targetValueType)Implements org. Return the property value associated with the given key,
or |
| protected <T> T | getProperty(String
the property name to resolve key, Class<T> the expected type of the property value targetValueType, boolean the default value to return if no value is found resolveNestedPlaceholders)Overrides org. Implements org. Return the property value associated with the given key,
or |
| protected String | getPropertyAsRawString(String
the property name to resolve key)Implements abstract org. Retrieve the specified property as a raw String, i.e. without resolution of nested placeholders. |
| protected void | logKeyFound(String
the key found key, PropertySource<?> the propertySource, Object PropertySource that the key has been found inthe corresponding value value)Log the given key as found in the given |
| propertySources | back to summary |
|---|---|
| private final PropertySources propertySources
| |
| PropertySourcesPropertyResolver | back to summary |
|---|---|
| public PropertySourcesPropertyResolver(PropertySources propertySources) Create a new resolver against the given property sources.
| |
| containsProperty | back to summary |
|---|---|
| public boolean containsProperty(String key) Overrides org. Implements org. Doc from org. Return whether the given property key is available for resolution,
i.e. if the value for the given key is not
| |
| getProperty | back to summary |
|---|---|
| public String getProperty(String key) Overrides org. Implements org. Doc from org. Return the property value associated with the given key,
or | |
| getProperty | back to summary |
|---|---|
| public <T> T getProperty(String key, Class<T> targetValueType) Implements org. Doc from org. Return the property value associated with the given key,
or | |
| getProperty | back to summary |
|---|---|
| protected <T> T getProperty(String key, Class<T> targetValueType, boolean resolveNestedPlaceholders) Overrides org. Implements org. Doc from org. Return the property value associated with the given key,
or | |
| getPropertyAsRawString | back to summary |
|---|---|
| protected String getPropertyAsRawString(String key) Implements abstract org. Doc from org. Retrieve the specified property as a raw String, i.e. without resolution of nested placeholders. | |
| logKeyFound | back to summary |
|---|---|
| protected void logKeyFound(String key, PropertySource<?> propertySource, Object value) Log the given key as found in the given The default implementation writes a debug log message with key and source. As of 4.3.3, this does not log the value anymore in order to avoid accidental logging of sensitive settings. Subclasses may override this method to change the log level and/or log message, including the property's value if desired.
| |