public class KeyVaultEnvironmentPostProcessor extends Object implements org.springframework.boot.env.EnvironmentPostProcessor, org.springframework.core.Ordered
EnvironmentPostProcessor to add Key Vault secrets as a property source.| Modifier and Type | Field and Description |
|---|---|
static int |
ORDER |
| Constructor and Description |
|---|
KeyVaultEnvironmentPostProcessor(org.apache.commons.logging.Log logger) |
| Modifier and Type | Method and Description |
|---|---|
void |
addKeyVaultPropertySource(org.springframework.core.env.ConfigurableEnvironment environment,
AzureKeyVaultPropertySourceProperties propertySource)
Add a key vault property source.
|
int |
getOrder() |
void |
postProcessEnvironment(org.springframework.core.env.ConfigurableEnvironment environment,
org.springframework.boot.SpringApplication application)
Post-process the environment.
|
public static final int ORDER
public KeyVaultEnvironmentPostProcessor(org.apache.commons.logging.Log logger)
public void postProcessEnvironment(org.springframework.core.env.ConfigurableEnvironment environment,
org.springframework.boot.SpringApplication application)
Here we are going to process any key vault(s) and make them as available PropertySource(s). Note this supports both the singular key vault setup, as well as the multiple key vault setup.
postProcessEnvironment in interface org.springframework.boot.env.EnvironmentPostProcessorenvironment - the environment.application - the application.public void addKeyVaultPropertySource(org.springframework.core.env.ConfigurableEnvironment environment,
AzureKeyVaultPropertySourceProperties propertySource)
The normalizedName is used to target a specific key vault (note if the name is the empty string it works as before with only one key vault present). The normalized name is the name of the specific key vault plus a trailing "." at the end.
environment - The Spring environment.propertySource - The property source properties.IllegalStateException - If KeyVaultOperations fails to initialize.public int getOrder()
getOrder in interface org.springframework.core.OrderedVisit the Azure for Java Developers site for more Java documentation, including quick starts, tutorials, and code samples.