public class PropertySourcesPropertyResolver extends AbstractPropertyResolver
PropertySources
のセットに対してプロパティ値を解決する PropertyResolver
実装。PropertySource
, PropertySources
, AbstractEnvironment
logger
コンストラクターと説明 |
---|
PropertySourcesPropertyResolver(PropertySources propertySources) 指定されたプロパティソースに対して新しいリゾルバーを作成します。 |
修飾子と型 | メソッドと説明 |
---|---|
boolean | containsProperty(StringSE key) 指定されたプロパティキーが解決に使用できるかどうかを返します。 |
StringSE | getProperty(StringSE key) 指定されたキーに関連付けられているプロパティ値を返します。キーを解決できない場合は null を返します。 |
<T> T | getProperty(StringSE key, ClassSE<T> targetValueType) 指定されたキーに関連付けられているプロパティ値を返します。キーを解決できない場合は null を返します。 |
protected <T> T | getProperty(StringSE key, ClassSE<T> targetValueType, boolean resolveNestedPlaceholders) |
protected StringSE | getPropertyAsRawString(StringSE key) 指定されたプロパティを生の文字列として取得します。 |
protected void | logKeyFound(StringSE key, PropertySource<?> propertySource, ObjectSE value) 指定された PropertySource で見つかった指定されたキーをログに記録し、結果として指定された値を取得します。 |
convertValueIfNecessary, getConversionService, getProperty, getProperty, getRequiredProperty, getRequiredProperty, resolveNestedPlaceholders, resolvePlaceholders, resolveRequiredPlaceholders, setConversionService, setIgnoreUnresolvableNestedPlaceholders, setPlaceholderPrefix, setPlaceholderSuffix, setRequiredProperties, setValueSeparator, validateRequiredProperties
cloneSE, equalsSE, finalizeSE, getClassSE, hashCodeSE, notifySE, notifyAllSE, toStringSE, waitSE, waitSE, waitSE
public PropertySourcesPropertyResolver(@Nullable PropertySources propertySources)
propertySources
- 使用する PropertySource
オブジェクトのセット public boolean containsProperty(StringSE key)
PropertyResolver
null
でないかどうかを返します。PropertyResolver
の containsProperty
AbstractPropertyResolver
の containsProperty
@Nullable public StringSE getProperty(StringSE key)
PropertyResolver
null
を返します。PropertyResolver
の getProperty
AbstractPropertyResolver
の getProperty
key
- 解決するプロパティ名 PropertyResolver.getProperty(String, String)
, PropertyResolver.getProperty(String, Class)
, PropertyResolver.getRequiredProperty(String)
@Nullable public <T> T getProperty(StringSE key, ClassSE<T> targetValueType)
PropertyResolver
null
を返します。key
- 解決するプロパティ名 targetValueType
- プロパティ値の予想される型 PropertyResolver.getRequiredProperty(String, Class)
@Nullable protected StringSE getPropertyAsRawString(StringSE key)
AbstractPropertyResolver
AbstractPropertyResolver
の getPropertyAsRawString
key
- 解決するプロパティ名 null
@Nullable protected <T> T getProperty(StringSE key, ClassSE<T> targetValueType, boolean resolveNestedPlaceholders)
protected void logKeyFound(StringSE key, PropertySource<?> propertySource, ObjectSE value)
PropertySource
で見つかった指定されたキーをログに記録し、結果として指定された値を取得します。デフォルトの実装では、キーとソースを含むデバッグログメッセージが書き込まれます。4.3.3 以降、機密設定の偶発的なロギングを回避するために、これは値をログに記録しなくなりました。サブクラスはこのメソッドをオーバーライドして、必要に応じてプロパティの値を含むログレベルやログメッセージを変更できます。
key
- 見つかったキー propertySource
- キーが見つかった PropertySource
value
- 対応する値