记坑: ConfigurationProperties 和 RefreshScope

当使用spring-cloud-config 和 spring-boot-configuration-processor时 使用bean接受配置文件里面配置

两个注解一起使用,会赋值失败

其实 只要使用ConfigurationProperties注解就可以,在配置文件中使用${}从springcloudConfig服务器取值

修改云端配置文件后,通过post发送refresh请求一样可以刷新修改后的值

转载于:https://my.oschina.net/razox/blog/842738

原文地址:https://www.cnblogs.com/twodog/p/12141242.html