クラス VaultPropertySource
java.lang.ObjectSE
org.springframework.core.env.PropertySource<T>
org.springframework.core.env.EnumerablePropertySource<VaultOperations>
org.springframework.vault.core.env.VaultPropertySource
VaultTemplate
および path
からキーと値を読み取る PropertySource
。PropertyTransformer
を使用して Vault からプロパティを取得した後、プロパティを変換します。- 作成者:
- Mark Paluch
- 関連事項:
ネストされたクラスのサマリー
クラス org.springframework.core.env.PropertySource から継承されたネストクラス / インターフェース
PropertySource.StubPropertySource
フィールドサマリー
クラス org.springframework.core.env.PropertySource から継承されたフィールド
name, source
コンストラクターのサマリー
コンストラクターコンストラクター説明VaultPropertySource
(StringSE name, VaultOperations vaultOperations, StringSE path) VaultPropertySource
(StringSE name, VaultOperations vaultOperations, StringSE path, PropertyTransformer propertyTransformer) VaultPropertySource
(StringSE name, VaultOperations vaultOperations, StringSE path, PropertyTransformer propertyTransformer, boolean ignoreSecretNotFound) VaultPropertySource
(VaultOperations vaultOperations, StringSE path) 方法の概要
修飾子と型メソッド説明doGetProperties
(StringSE path) Vault からプロパティを取得するフックメソッド。doTransformProperties
(MapSE<StringSE, ObjectSE> properties) PropertyTransformer
を使用してプロパティを変換するフックメソッド。flattenMap
(MapSE<StringSE, ObjectSE> data) String/Object
マップをフラットString/Object
マップに変換するユーティリティメソッド。getProperty
(StringSE name) StringSE[]
protected void
プロパティソースを初期化し、Vault からプロパティを読み取ります。クラス org.springframework.core.env.EnumerablePropertySource から継承されたメソッド
containsProperty
コンストラクターの詳細
VaultPropertySource
- パラメーター:
vaultOperations
- null であってはなりません。path
- Vault 内のパス (例:secret/myapp/myproperties
。空または null であってはなりません)。
VaultPropertySource
- パラメーター:
name
- プロパティソースの名前。null であってはなりません。vaultOperations
- null であってはなりません。path
- Vault 内のパス (例:secret/myapp/myproperties
。空または null であってはなりません)。
VaultPropertySource
public VaultPropertySource(StringSE name, VaultOperations vaultOperations, StringSE path, PropertyTransformer propertyTransformer) Vault 内にname
、VaultTemplate
、path
を指定して新しいVaultPropertySource
を作成します。このプロパティソースは構築時にプロパティをロードし、PropertyTransformer
を適用することでこれらを変換します。- パラメーター:
name
- プロパティソースの名前。null であってはなりません。vaultOperations
- null であってはなりません。path
- Vault 内のパス (例:secret/myapp/myproperties
。空または null であってはなりません)。propertyTransformer
- プロパティを変換するオブジェクト。- 関連事項:
VaultPropertySource
public VaultPropertySource(StringSE name, VaultOperations vaultOperations, StringSE path, PropertyTransformer propertyTransformer, boolean ignoreSecretNotFound) Vault 内にname
、VaultTemplate
、path
を指定して新しいVaultPropertySource
を作成します。このプロパティソースは構築時にプロパティをロードし、PropertyTransformer
を適用することでこれらを変換します。- パラメーター:
name
- プロパティソースの名前。null であってはなりません。vaultOperations
- null であってはなりません。path
- Vault 内のパス (例:secret/myapp/myproperties
。空または null であってはなりません)。propertyTransformer
- プロパティを変換するオブジェクト。ignoreSecretNotFound
-path
でシークレットを見つけられなかった場合を無視する必要があるかどうかを示します。- 導入:
- 2.2
- 関連事項:
メソッドの詳細
loadProperties
protected void loadProperties()プロパティソースを初期化し、Vault からプロパティを読み取ります。getProperty
- 次で指定:
- クラス
PropertySource<VaultOperations>
のgetProperty
getPropertyNames
- 次で指定:
- クラス
EnumerablePropertySource<VaultOperations>
のgetPropertyNames
doGetProperties
Vault からプロパティを取得するフックメソッド。- パラメーター:
path
- パスは空または null であってはなりません。- 戻り値:
- 結果の
Map
SE、またはプロパティが見つからなかった場合は null。 - 例外:
VaultException
- プロパティの取得の問題について
doTransformProperties
PropertyTransformer
を使用してプロパティを変換するフックメソッド。- パラメーター:
properties
- null であってはなりません。- 戻り値:
- 変換されたプロパティ。
flattenMap
String/Object
マップをフラットString/Object
マップに変換するユーティリティメソッド。ネストされたオブジェクトは、プロパティパスキーで表されます。- パラメーター:
data
- 地図- 戻り値:
- フラット化されたマップ。
- 導入:
- 2.0