|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.boot.bind.RelaxedPropertyResolver
public class RelaxedPropertyResolver
PropertyResolver that attempts to resolve values using RelaxedNames.
RelaxedNames| Constructor Summary | |
|---|---|
RelaxedPropertyResolver(org.springframework.core.env.PropertyResolver resolver)
|
|
RelaxedPropertyResolver(org.springframework.core.env.PropertyResolver resolver,
String prefix)
|
|
| Method Summary | ||
|---|---|---|
boolean |
containsProperty(String key)
|
|
String |
getProperty(String key)
|
|
|
getProperty(String key,
Class<T> targetType)
|
|
|
getProperty(String key,
Class<T> targetType,
T defaultValue)
|
|
String |
getProperty(String key,
String defaultValue)
|
|
|
getPropertyAsClass(String key,
Class<T> targetType)
|
|
String |
getRequiredProperty(String key)
|
|
|
getRequiredProperty(String key,
Class<T> targetType)
|
|
static Map<String,Object> |
getSubProperties(org.springframework.core.env.PropertySources propertySources,
RelaxedNames keyPrefix)
Return a Map of all values from the specified PropertySources that start
with a particular key. |
|
static Map<String,Object> |
getSubProperties(org.springframework.core.env.PropertySources propertySources,
String rootPrefix,
RelaxedNames keyPrefix)
Return a Map of all values from the specified PropertySources that start
with a particular key. |
|
Map<String,Object> |
getSubProperties(String keyPrefix)
Return a Map of all values from all underlying properties that start with the specified key. |
|
String |
resolvePlaceholders(String text)
|
|
String |
resolveRequiredPlaceholders(String text)
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RelaxedPropertyResolver(org.springframework.core.env.PropertyResolver resolver)
public RelaxedPropertyResolver(org.springframework.core.env.PropertyResolver resolver,
String prefix)
| Method Detail |
|---|
public String getRequiredProperty(String key)
throws IllegalStateException
getRequiredProperty in interface org.springframework.core.env.PropertyResolverIllegalStateException
public <T> T getRequiredProperty(String key,
Class<T> targetType)
throws IllegalStateException
getRequiredProperty in interface org.springframework.core.env.PropertyResolverIllegalStateExceptionpublic String getProperty(String key)
getProperty in interface org.springframework.core.env.PropertyResolver
public String getProperty(String key,
String defaultValue)
getProperty in interface org.springframework.core.env.PropertyResolver
public <T> T getProperty(String key,
Class<T> targetType)
getProperty in interface org.springframework.core.env.PropertyResolver
public <T> T getProperty(String key,
Class<T> targetType,
T defaultValue)
getProperty in interface org.springframework.core.env.PropertyResolver
public <T> Class<T> getPropertyAsClass(String key,
Class<T> targetType)
getPropertyAsClass in interface org.springframework.core.env.PropertyResolverpublic boolean containsProperty(String key)
containsProperty in interface org.springframework.core.env.PropertyResolverpublic String resolvePlaceholders(String text)
resolvePlaceholders in interface org.springframework.core.env.PropertyResolver
public String resolveRequiredPlaceholders(String text)
throws IllegalArgumentException
resolveRequiredPlaceholders in interface org.springframework.core.env.PropertyResolverIllegalArgumentExceptionpublic Map<String,Object> getSubProperties(String keyPrefix)
ConfigurableEnvironment.
keyPrefix - the key prefix used to filter results
getSubProperties(PropertySources, RelaxedNames),
getSubProperties(PropertySources, String, RelaxedNames)
public static Map<String,Object> getSubProperties(org.springframework.core.env.PropertySources propertySources,
RelaxedNames keyPrefix)
PropertySources that start
with a particular key.
propertySources - the property sources to scankeyPrefix - the key prefixes to test
getSubProperties(PropertySources, String, RelaxedNames)
public static Map<String,Object> getSubProperties(org.springframework.core.env.PropertySources propertySources,
String rootPrefix,
RelaxedNames keyPrefix)
PropertySources that start
with a particular key.
propertySources - the property sources to scanrootPrefix - a root prefix to be prepended to the keyPrefex (can be
null)keyPrefix - the key prefixes to test
getSubProperties(PropertySources, String, RelaxedNames)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||