public abstract class VaultPropertySourceLocatorSupport extends Object implements org.springframework.cloud.bootstrap.config.PropertySourceLocator
PropertySourceLocator to create PropertySources based on
VaultKeyValueBackendProperties and SecretBackendMetadata.| Constructor and Description |
|---|
VaultPropertySourceLocatorSupport(String propertySourceName,
PropertySourceLocatorConfiguration propertySourceLocatorConfiguration)
Creates a new
VaultPropertySourceLocatorSupport given a
PropertySourceLocatorConfiguration. |
VaultPropertySourceLocatorSupport(String propertySourceName,
VaultGenericBackendProperties genericBackendProperties,
Collection<SecretBackendMetadata> backendAccessors)
Creates a new
VaultPropertySourceLocatorSupport. |
| Modifier and Type | Method and Description |
|---|---|
protected org.springframework.core.env.CompositePropertySource |
createCompositePropertySource(org.springframework.core.env.Environment environment)
Creates a
CompositePropertySource. |
protected abstract org.springframework.core.env.PropertySource<?> |
createVaultPropertySource(SecretBackendMetadata accessor)
Create
VaultPropertySource initialized with a SecretBackendMetadata
. |
protected org.springframework.core.env.CompositePropertySource |
doCreateCompositePropertySource(String propertySourceName,
List<org.springframework.core.env.PropertySource<?>> propertySources)
|
protected List<org.springframework.core.env.PropertySource<?>> |
doCreateKeyValuePropertySources(org.springframework.core.env.Environment environment)
Create
PropertySources using the kv secret backend. |
protected List<org.springframework.core.env.PropertySource<?>> |
doCreatePropertySources(org.springframework.core.env.Environment environment)
Create
PropertySources given Environment from the property
configuration. |
protected void |
initialize(org.springframework.core.env.CompositePropertySource propertySource)
Allows initialization the
PropertySource before use. |
org.springframework.core.env.PropertySource<?> |
locate(org.springframework.core.env.Environment environment) |
public VaultPropertySourceLocatorSupport(String propertySourceName, VaultGenericBackendProperties genericBackendProperties, Collection<SecretBackendMetadata> backendAccessors)
VaultPropertySourceLocatorSupport.propertySourceName - must not be null or empty.genericBackendProperties - must not be null.backendAccessors - must not be null.public VaultPropertySourceLocatorSupport(String propertySourceName, PropertySourceLocatorConfiguration propertySourceLocatorConfiguration)
VaultPropertySourceLocatorSupport given a
PropertySourceLocatorConfiguration.propertySourceName - must not be null or empty.propertySourceLocatorConfiguration - must not be null.public org.springframework.core.env.PropertySource<?> locate(org.springframework.core.env.Environment environment)
locate in interface org.springframework.cloud.bootstrap.config.PropertySourceLocatorprotected void initialize(org.springframework.core.env.CompositePropertySource propertySource)
PropertySource before use. Implementations may
override this method to preload properties in the PropertySource.propertySource - must not be null.protected org.springframework.core.env.CompositePropertySource createCompositePropertySource(org.springframework.core.env.Environment environment)
CompositePropertySource.environment - must not be null.PropertySource.protected List<org.springframework.core.env.PropertySource<?>> doCreatePropertySources(org.springframework.core.env.Environment environment)
PropertySources given Environment from the property
configuration.environment - must not be null.List of ordered PropertySources.protected List<org.springframework.core.env.PropertySource<?>> doCreateKeyValuePropertySources(org.springframework.core.env.Environment environment)
PropertySources using the kv secret backend. Property
sources for the kv secret backend derive from the application name and active
profiles to generate context paths.environment - must not be null.List of PropertySources.protected org.springframework.core.env.CompositePropertySource doCreateCompositePropertySource(String propertySourceName, List<org.springframework.core.env.PropertySource<?>> propertySources)
propertySourceName - the property source name.propertySources - the property sources.CompositePropertySource to use.protected abstract org.springframework.core.env.PropertySource<?> createVaultPropertySource(SecretBackendMetadata accessor)
VaultPropertySource initialized with a SecretBackendMetadata
.accessor - the SecretBackendMetadata.VaultPropertySource to use.Copyright © 2021 Pivotal Software, Inc.. All rights reserved.