修改3344服务 pom文件
<!--添加消息总线RabbitMQ支持-->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-bus-amqp</artifactId>
</dependency>
yaml文件
#rabbitmq相关配置
spring:
rabbitmq:
host: localhost
port: 5672
username: guest
password: guest
##rabbitmq相关配置,暴露bus刷新配置的端点
management:
endpoints: #暴露bus刷新配置的端点
web:
exposure:
include: 'bus-refresh'
修改客户端3355.....服务
修改pom文件
<!--添加消息总线RabbitMQ支持-->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-bus-amqp</artifactId>
</dependency>
修改yml文件
#rabbitmq相关配置 15672是Web管理界面的端口;5672是MQ访问的端口
rabbitmq:
host: localhost
port: 5672
username: guest
password: guest
# 暴露监控端点
management:
endpoints:
web:
exposure:
include: "*" # 'refresh' 注:refresh是先前手动刷新的配置
标签:guest,spring,springcloud,刷新,总线,rabbitmq,bus,cloud
From: https://www.cnblogs.com/huoziqi/p/17537955.html