spring-cloud / spring-cloud-vault

Configuration Integration with HashiCorp Vault
http://cloud.spring.io/spring-cloud-vault/
Apache License 2.0
270 stars 151 forks source link

spring.cloud.vault.kv.profiles is always ignored #630

Closed benba closed 1 year ago

benba commented 2 years ago

Describe the bug spring.cloud.vault.kv.profiles is always overridden by spring.profiles.active (even if application profile is not defined).

From the documentation it looks like spring.cloud.vault.kv.profiles should always supersede spring.profiles.active (like spring.cloud.vault.kv.application-name over spring.application.name)

It seems to be linked to this code where setProfiles is called with the active profile no matter of the previously spring.cloud.vault.kv.profiles binded value.

Sample An application with that config will reproduce the issue:

spring.profiles.active=app-profile
spring.cloud.vault.kv.profiles=kv-profile