pivotal-cf / java-cfenv

Apache License 2.0
91 stars 56 forks source link

spring.config.use-legacy-processing broken #135

Open dyroberts opened 3 years ago

dyroberts commented 3 years ago

Quote from #133 :

Values set in application.yml are ignored When legacy processing is enabled the values from the application.yml file are apparently not available. This results in any additional configuration settings such as spring.cloud.application-name not being accessed when the Vault source is configured.

If keys are stored under the application's name and not under application the keys will fail to be found resulting in application failure. This also causes issues when an application is not using the backend of secret for KV backends. Configuring the setting spring.cloud.vault.kv.backend does not result in the proper backend being accessed. To resolve this, a custom processor for vault had to be created so that the correct backend would be read.

Workaround Set these values as environment variables in the manifest file. This will result in the proper configuration of the application. Caveat, only tested this with spring.application.name.