【问题标题】:Spring Cloud Bus does not longer support POST requests to /actuator/bus-refreshSpring Cloud Bus 不再支持对 /actuator/bus-refresh 的 POST 请求
【发布时间】:2021-04-15 16:22:10
【问题描述】:

我发现 Spring Cloud Bus 不支持在 Spring Cloud 版本 2020.0.0 上对 /actuator/bus-refresh 的 POST 请求。当我尝试发送它时,我收到 405“不允许的方法”。有没有办法在不使用 /monitor 和 git webhooks 或降级 Spring Cloud 版本的情况下自动刷新所有客户端服务的配置?

我已经包含了spring-cloud-starter-bus-amqpspring-boot-starter-actuator 依赖项,bus-refresh 端点暴露了。 RabbitMQ 已启动并运行,springCloudBus 主题已创建并在我的服务启动时添加队列。当我向 /actuator/bus-refresh 发出 GET 请求时,它会将属性源提取到我的配置服务器,但我的客户端服务属性文件未刷新且消息未添加到队列中。

【问题讨论】:

    标签: spring-cloud spring-boot-actuator spring-cloud-config spring-cloud-bus


    【解决方案1】:

    在最新的重大更改日志中找到 here bus-refresh 端点被重命名为 busrefresh。

    bus-env 现在是 busenv

    bus-refresh 现在是 busrefresh

    【讨论】:

      猜你喜欢
      • 2020-07-06
      • 2020-12-15
      • 2017-05-18
      • 2017-10-12
      • 2016-09-29
      • 2021-04-20
      • 2018-05-11
      • 2017-10-28
      • 2019-07-01
      相关资源
      最近更新 更多