For the development environment, I have configured bootstrap.properties
to disable vault configuration.
spring.cloud.vault.enabled=false
If it is disabled then the application should read the properties from local config application.properties file. But how to do that?
As a workaround, I have defined the local properties in application.properties
as below
xyz.db.user=${xyz.db.user.fromVault:test}
xyz.db.password=${xyz.db.password.fromVault:test}
So the application first checks if xyz.db.user.fromVault
property is configured in vault. If not, then set xyz.db.user
to test
But this doesn't feel like a right approach, as I need to maintain multiple properties. Is there any right way?