spring boot application.yml属性在运行时更改

时间:2015-08-02 07:16:10

标签: spring spring-boot

在spring启动应用程序中,我能够使用@ConfigurationProperties批注将application.yml中的属性绑定到bean字段。

是否可以在运行时更新application.yml中的这些属性并将它们反映在bean中?如是。这该怎么做?

过去,我使用ReloadableResourceBundleMessageSource

进行了此操作

1 个答案:

答案 0 :(得分:3)

Spring Cloud Config做到了这一点以及更多。请特别检查the sample application

相关问题