クラスの使用
org.springframework.core.env.PropertySource
PropertySource を使用するパッケージ
パッケージ
説明
Bean 定義プロファイルと階層プロパティソースのサポートで構成される Spring の環境抽象化。
Spring のリソース抽象化のサポートクラス。
このパッケージのクラスを使用すると、JNDI が使いやすくなり、JNDI に格納されている構成へのアクセスが容易になり、JNDI アクセスクラスに便利なスーパークラスが提供されます。
このパッケージには、
Environment
および PropertySource
抽象化のモック実装が含まれています。WebApplicationContext 実装やさまざまなユーティリティクラスなど、
org.springframework.web.context
パッケージをサポートするクラス。org.springframework.core.env 内の PropertySource 使用
修飾子と型クラス説明class
コマンドライン引数に基づくPropertySource
実装の抽象基本クラス。class
PropertySource
インスタンスのセットを反復処理する複合PropertySource
実装。class
基になるソースオブジェクトに問い合わせて、可能なすべてのプロパティの名前と値のペアを列挙できるPropertySource
実装。class
使用すべきではありません。6.1 以降、代替の予定なしclass
Map
オブジェクトからキーと値を読み取るPropertySource
。class
Properties
SE オブジェクトからプロパティを抽出するPropertySource
実装。static class
実際のプロパティソースをアプリケーションコンテキストの作成時に積極的に初期化できない場合にプレースホルダーとして使用されるPropertySource
。class
単純な文字列配列に裏付けされたCommandLinePropertySource
実装。class
システム環境変数で使用するために設計されたMapPropertySource
の特殊化。PropertySource を返す org.springframework.core.env のメソッド修飾子と型メソッド説明指定された名前、null
が見つからない場合、プロパティソースを返します。static PropertySource<?>
コレクションの比較のみを目的としたPropertySource
実装を返します。指定された名前のプロパティソースを削除して返します。見つからない場合はnull
を返します。型 PropertySource の引数を持つ型を返す org.springframework.core.env のメソッド修飾子と型メソッド説明CompositePropertySource.getPropertySources()
この複合ソースが保持するすべてのプロパティソースを返します。MutablePropertySources.iterator()
MutablePropertySources.spliterator()
MutablePropertySources.stream()
default StreamSE<PropertySource<?>>
PropertySources.stream()
プロパティソースを含むシーケンシャルStream
SE を返します。型 PropertySource のパラメーターを持つ org.springframework.core.env のメソッド修飾子と型メソッド説明void
MutablePropertySources.addAfter
(StringSE relativePropertySourceName, PropertySource<?> propertySource) 指定されたプロパティソースオブジェクトを、名前付きの相対プロパティソースのすぐ下の優先順位で追加します。void
MutablePropertySources.addBefore
(StringSE relativePropertySourceName, PropertySource<?> propertySource) 指定されたプロパティソースオブジェクトを、指定された相対プロパティソースのすぐ上の優先順位で追加します。void
MutablePropertySources.addFirst
(PropertySource<?> propertySource) 指定されたプロパティソースオブジェクトを最高の優先順位で追加します。void
CompositePropertySource.addFirstPropertySource
(PropertySource<?> propertySource) 指定されたPropertySource
をチェーンの先頭に追加します。void
MutablePropertySources.addLast
(PropertySource<?> propertySource) 優先順位が最も低い特定のプロパティソースオブジェクトを追加します。void
CompositePropertySource.addPropertySource
(PropertySource<?> propertySource) 指定されたPropertySource
をチェーンの末尾に追加します。protected void
MutablePropertySources.assertLegalRelativeAddition
(StringSE relativePropertySourceName, PropertySource<?> propertySource) 指定されたプロパティソースがそれ自体に対して追加されていないことを確認してください。protected void
PropertySourcesPropertyResolver.logKeyFound
(StringSE key, PropertySource<?> propertySource, ObjectSE value) 指定されたPropertySource
で見つかった指定されたキーをログに記録し、結果として指定された値を取得します。int
MutablePropertySources.precedenceOf
(PropertySource<?> propertySource) 指定されたプロパティソースの優先順位を返します。見つからない場合は-1
を返します。protected void
MutablePropertySources.removeIfPresent
(PropertySource<?> propertySource) 指定されたプロパティソースが存在する場合は削除します。void
MutablePropertySources.replace
(StringSE name, PropertySource<?> propertySource) 指定された名前のプロパティソースを指定されたプロパティソースオブジェクトに置き換えます。org.springframework.core.io.support 内の PropertySource 使用
修飾子と型クラス説明class
Resource
または"classpath:/com/myco/foo.properties"
や"file:/path/to/file.xml"
などのリソースの場所からProperties
SE オブジェクトをロードするPropertiesPropertySource
のサブクラス。修飾子と型メソッド説明DefaultPropertySourceFactory.createPropertySource
(StringSE name, EncodedResource resource) PropertySourceFactory.createPropertySource
(StringSE name, EncodedResource resource) 指定されたリソースをラップするPropertySource
を作成します。org.springframework.jndi 内の PropertySource 使用
org.springframework.jndi 内の PropertySource サブクラスorg.springframework.mock.env 内の PropertySource 使用
org.springframework.web.context.support 内の PropertySource 使用
修飾子と型クラス説明class
ServletConfig
EE オブジェクトから初期化パラメーターを読み取るPropertySource
。class
ServletContext
EE オブジェクトから初期化パラメーターを読み取るPropertySource
。