我想我在使用 RabbitMQ 实现 Spring Cloud Bus 方面陷入了死胡同。
请记住,这是通过Spring Boot 2.0.0.M7 和 Spring Cloud Finchley.M5 完成的,根据它们的发行说明应该是兼容的。
我试图让它发挥作用:
/actuator/bus-refreshPOST 调用接收刷新请求但是,我可以在服务器的日志中看到这一点:
o.s.cloud.bus.event.RefreshListener : Received remote refresh request. Keys refreshed []
Run Code Online (Sandbox Code Playgroud)
(空数组是罪魁祸首吗?在这种情况下,我真的不知道该怎么办:()
客户端没有任何内容(除非我手动向总线刷新端点发送 POST 请求)......在这种情况下,日志中的输出如下:
o.s.cloud.bus.event.RefreshListener : Received remote refresh request. Keys refreshed [config.client.version, message]
Run Code Online (Sandbox Code Playgroud)
当我查看 RabbitMQ(作为 Docker 容器运行)中的图表时,我看到了三个连接的应用程序:客户端、Zuul(反向代理)和配置服务器。
你能帮我解决这个问题吗?非常感谢。以下是我对应用程序的配置。
配置服务器 POM.xml:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.paromsoft</groupId>
<artifactId>config</artifactId>
<version>0.0.1-SNAPSHOT</version> …Run Code Online (Sandbox Code Playgroud) java spring-boot spring-cloud spring-cloud-config spring-cloud-bus