spring boot 2.0.1.RELEASE版本之消息总线 ConfigClient配置自动刷新

参考博文https://blog.csdn.net/qq_35098526/article/details/80017725web

关键:app

一、 @RefreshScope 注解在@Value所在的类,不注解不会刷新。post

二、适用于2.0的配置application.ymlspa

 management:

  endpoints:

    web:

      exposure:

        include: bus-refresh

 

三、请求http://localhost:${config-client-port}/actuator/bus-refresh(使用post方法).net

注意查看config-client打印出的日志。日志

相关文章
相关标签/搜索