Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

spring boot application.yml properties change at runtime

In a spring boot application, I am able to bind properties from application.yml to the bean fields using @ConfigurationProperties annotation.

Is it possible to update these properties in application.yml at runtime and get them reflected in the bean? If yes. How to do this?

In the past, I've gotten this working using ReloadableResourceBundleMessageSource

like image 702
krishnakumarp Avatar asked Oct 20 '22 05:10

krishnakumarp


1 Answers

Spring Cloud Config does that and more. In particular, check the sample application.

like image 192
Stephane Nicoll Avatar answered Oct 22 '22 00:10

Stephane Nicoll