Spring Cloud Config 动态刷新

<dependency>
   <groupId>org.springframework.boot</groupId>
   <artifactId>spring-boot-starter-actuator</artifactId>
</dependency>

POM加上监控依赖

2.修改yml 暴露监控断点

# 暴露监控端点:
management:
  endpoints:
    web:
      exposure:
        include: "*"
@RefreshScope  同步配置

向配置中心发送post请求

curl  -X POST "http://localhost:3355/actuator/refresh"

猜你喜欢

转载自blog.csdn.net/weixin_46310452/article/details/126326919