# 1.在所有项目中引入bus依赖
org.springframework.cloud spring-cloud-starter-bus-amqp
# 2.配置统一配置中心连接到mq
spring.rabbitmq.host=localhost #连接主机 spring.rabbitmq.port=5672 #连接mq端口 spring.rabbitmq.username=user #连接mq用户名 spring.rabbitmq.password=password
# 3.远端配置中加入连接mq配置
# 4.启动统一配置中心服务 - 正常启动
# 5.启动客户端服务
- 加入bus组件之后客户端启动报错
- 原因springcloud中默认链接不到远程服务器不会报错,但是在使用bus消息总线时必须开启连接远程服务失败报错
spring.cloud.config.fail-fast=true
# 6.修改远程配置后在配置中心服务通过执行post接口刷新配置 - curl -X POST http://localhost:7878/actuator/bus-refresh
# 7.通过上述配置就实现了配置统一刷新



