类 PropertySourcesPropertyResolver
java.lang.Object
cn.taketoday.core.env.AbstractPropertyResolver
cn.taketoday.core.env.TypedPropertyResolver
cn.taketoday.core.env.PropertySourcesPropertyResolver
- 所有已实现的接口:
ConfigurablePropertyResolver,IterablePropertyResolver,PropertyResolver,PlaceholderResolver,Iterable<String>
public class PropertySourcesPropertyResolver
extends TypedPropertyResolver
implements IterablePropertyResolver
PropertyResolver implementation that resolves property values against
an underlying set of PropertySources.- 从以下版本开始:
- 4.0
- 作者:
- Chris Beams, Juergen Hoeller
- 另请参阅:
-
构造器概要
构造器构造器说明PropertySourcesPropertyResolver(PropertySources propertySources) Create a new resolver against the given property sources. -
方法概要
修饰符和类型方法说明booleancontainsProperty(String key) Return whether the given property key is available for resolution, i.e. if the value for the given key is notnull.void<T> TgetProperty(String key, Class<T> targetValueType, boolean resolveNestedPlaceholders) iterator()Returns an iterator of property-names.protected voidlogKeyFound(String key, PropertySource<?> propertySource, Object value) Log the given key as found in the givenPropertySource, resulting in the given value.从类继承的方法 cn.taketoday.core.env.TypedPropertyResolver
getProperty, getProperty, getPropertyAsRawString从类继承的方法 cn.taketoday.core.env.AbstractPropertyResolver
addRequiredProperties, convertValueIfNecessary, getConversionService, getProperty, getProperty, getRequiredProperty, getRequiredProperty, resolveNestedPlaceholders, resolvePlaceholder, resolvePlaceholders, resolveRequiredPlaceholders, setConversionService, setIgnoreUnresolvableNestedPlaceholders, setPlaceholderPrefix, setPlaceholderSuffix, setRequiredProperties, setValueSeparator, validateRequiredProperties从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait从接口继承的方法 cn.taketoday.core.env.PropertyResolver
getFlag, getFlag, getProperty, getProperty, getProperty, getProperty, getRequiredProperty, getRequiredProperty, resolvePlaceholders, resolveRequiredPlaceholders
-
构造器详细资料
-
PropertySourcesPropertyResolver
Create a new resolver against the given property sources.- 参数:
propertySources- the set ofPropertySourceobjects to use
-
-
方法详细资料
-
containsProperty
从接口复制的说明:PropertyResolverReturn whether the given property key is available for resolution, i.e. if the value for the given key is notnull.- 指定者:
containsProperty在接口中PropertyResolver- 覆盖:
containsProperty在类中AbstractPropertyResolver
-
getProperty
@Nullable public <T> T getProperty(String key, Class<T> targetValueType, boolean resolveNestedPlaceholders) - 指定者:
getProperty在类中TypedPropertyResolver
-
logKeyFound
Log the given key as found in the givenPropertySource, resulting in the given value.The default implementation writes a debug log message with key and source. 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.
- 参数:
key- the key foundpropertySource- thePropertySourcethat the key has been found invalue- the corresponding value
-
getPropertyNames
-
iterator
从接口复制的说明:IterablePropertyResolverReturns an iterator of property-names.- 指定者:
iterator在接口中Iterable<String>- 指定者:
iterator在接口中IterablePropertyResolver- 返回:
- a property-names Iterator.
-
forEach
-
spliterator
- 指定者:
spliterator在接口中Iterable<String>
-