Spring Boot's ConfigData API is a new API to load configuration data from various sources. Vault is an ideal candidate as all PropertySource bootstrapping can be done with the newly introduced API.
The syntax to enable Vault (using Key-Value secret defaulting) would be:
spring.config.import=vault:
We can additionally check whether there's a path associated with the config source:
That would allow for customizing the context paths that get mounted as property sources.
Since ConfigData has no association to the Bootstrap Context anymore, we need to bootstrap out infrastructure beans ourselves and make sure these get propagated into the application context for lifecycle management.
Spring Boot's ConfigData API is a new API to load configuration data from various sources. Vault is an ideal candidate as all
PropertySource
bootstrapping can be done with the newly introduced API.The syntax to enable Vault (using Key-Value secret defaulting) would be:
We can additionally check whether there's a path associated with the config source:
That would allow for customizing the context paths that get mounted as property sources.
Since ConfigData has no association to the Bootstrap Context anymore, we need to bootstrap out infrastructure beans ourselves and make sure these get propagated into the application context for lifecycle management.