英文:
how to change runtime application.properties in spring boot
问题
在Spring Boot应用程序中,我可以使用@ConfigurationProperties
注解将application.yml
中的属性绑定到bean字段。
是否可能在运行时更新application.yml
中的这些属性,并使其在bean中反映出来?如果是,应该如何做到这一点?
英文:
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?
专注分享java语言的经验与见解,让所有开发者获益!
评论