クラス CompositePropertySource
java.lang.ObjectSE
org.springframework.core.env.PropertySource<T>
org.springframework.core.env.EnumerablePropertySource<ObjectSE>
org.springframework.core.env.CompositePropertySource
一連の
PropertySource
インスタンスを反復処理する複合 PropertySource
実装。複数のプロパティソースが同じ名前を共有する場合に必要です。@PropertySource
に複数の値が提供されている場合。Spring 4.1.2 の時点で、このクラスはプレーン PropertySource
の代わりに EnumerablePropertySource
を継承し、含まれているすべてのソースからの累積プロパティ名に基づいて getPropertyNames()
を公開します(可能な限り)。
- 導入:
- 3.1.1
- 作成者:
- Chris Beams, Juergen Hoeller, Phillip Webb
ネストされたクラスのサマリー
クラス org.springframework.core.env.PropertySource から継承されたネストクラス / インターフェース
PropertySource.StubPropertySource
フィールドサマリー
クラス org.springframework.core.env.PropertySource から継承されたフィールド
logger, name, source
コンストラクターのサマリー
メソッドのサマリー
修飾子と型メソッド説明void
addFirstPropertySource
(PropertySource<?> propertySource) 指定されたPropertySource
をチェーンの先頭に追加します。void
addPropertySource
(PropertySource<?> propertySource) 指定されたPropertySource
をチェーンの末尾に追加します。boolean
containsProperty
(StringSE name) このPropertySource
に、指定された名前のプロパティが含まれているかどうかを返します。getProperty
(StringSE name) 指定された名前に関連付けられた値を返します。見つからない場合はnull
を返します。StringSE[]
ソースオブジェクトに含まれるすべてのプロパティの名前を返します(null
は決してしないでください)。この複合ソースが保持するすべてのプロパティソースを返します。toString()
現在のログレベルにデバッグが含まれていない場合は、簡潔な出力(型と名前)を生成します。
コンストラクターの詳細
CompositePropertySource
新しいCompositePropertySource
を作成します。- パラメーター:
name
- プロパティソースの名前
メソッドの詳細
getProperty
クラスからコピーされた説明:PropertySource
指定された名前に関連付けられた値を返します。見つからない場合はnull
を返します。- 次で指定:
- クラス
PropertySource<ObjectSE>
のgetProperty
- パラメーター:
name
- 検索するプロパティ- 関連事項:
containsProperty
クラスからコピーされた説明:EnumerablePropertySource
このPropertySource
に、指定された名前のプロパティが含まれているかどうかを返します。この実装は、
EnumerablePropertySource.getPropertyNames()
配列内の指定された名前の存在を確認します。- オーバーライド:
- クラス
EnumerablePropertySource<ObjectSE>
のcontainsProperty
- パラメーター:
name
- 検索するプロパティの名前
getPropertyNames
クラスからコピーされた説明:EnumerablePropertySource
ソースオブジェクトに含まれるすべてのプロパティの名前を返します(null
は決してしないでください)。- 次で指定:
- クラス
EnumerablePropertySource<ObjectSE>
のgetPropertyNames
addPropertySource
指定されたPropertySource
をチェーンの末尾に追加します。- パラメーター:
propertySource
- 追加する PropertySource
addFirstPropertySource
指定されたPropertySource
をチェーンの先頭に追加します。- パラメーター:
propertySource
- 追加する PropertySource- 導入:
- 4.1
getPropertySources
この複合ソースが保持するすべてのプロパティソースを返します。- 導入:
- 4.1.1
toString
クラスからコピーされた説明:PropertySource
現在のログレベルにデバッグが含まれていない場合は、簡潔な出力(型と名前)を生成します。デバッグが有効になっている場合は、PropertySource インスタンスのハッシュコードとすべての名前 / 値プロパティのペアを含む詳細な出力を生成します。この変数の冗長性は、システムプロパティや環境変数などのプロパティソースに任意の数のプロパティペアが含まれている可能性があり、例外やログメッセージの読み取りが困難になる可能性があるため便利です。
- オーバーライド:
- クラス
PropertySource<ObjectSE>
のtoString
- 関連事項: