Closed oguzhanonder91 closed 2 years ago
@Value
is injected only once during component construction. Please either make your component @RefreshScope
d or access the value through Environment
.
Thanks for answer @mp911de . I added @RefreshScope to my configuration class but my properties not updated.
The duplication with the StackOverflow post isn't ideal as there are easy-to-miss details. Your config is declared with renewal = VaultPropertySource.Renewal.RENEW
. Please use renewal = VaultPropertySource.Renewal.ROTATE
for rotation. Also, please note that only key-value secrets using the kv backend version 1 can be rotated if the Cache TTL expires. kv version 2 doesn't support cache TTLs.
When I update a property in the vault and call actuator / refresh, it still shows an older value.
I use spring boot and spring cloud.