You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When token in rotated in the vault, the property value is updated in the Spring Context Environment but the Refresh Event does not seem to be triggered. As the result, using @RefreshScope, @Value or @ConfigurationProperties does not work.
However, if property is injected with @Value or @ConfigurationProperties, the old value assigned at the application startup is used even if @RefreshScope is added to the @Bean. And none of the beans annotated with @RefreshScope are recreated.
Expected behavior: when GET /v1/gcp-non-prod/static-account/svc-dev-rebatearc-gcs/key?prefix=app.storage.credentials. is invoked and a new value is received from the vault, the Refresh Event is published so any @Bean with @RefreshScope can be refreshed.
The text was updated successfully, but these errors were encountered:
Describe the bug
When token in rotated in the vault, the property value is updated in the Spring Context Environment but the Refresh Event does not seem to be triggered. As the result, using
@RefreshScope
,@Value
or@ConfigurationProperties
does not work.Sample
Given vault config:
The following code is actually working:
However, if property is injected with
@Value
or@ConfigurationProperties
, the old value assigned at the application startup is used even if@RefreshScope
is added to the@Bean
. And none of the beans annotated with@RefreshScope
are recreated.Expected behavior: when
GET /v1/gcp-non-prod/static-account/svc-dev-rebatearc-gcs/key?prefix=app.storage.credentials.
is invoked and a new value is received from the vault, theRefresh Event
is published so any@Bean
with@RefreshScope
can be refreshed.The text was updated successfully, but these errors were encountered: