【问题标题】:Spring Cloud Bus, how to specify multiple destination in /bus/refresh?destination=?Spring Cloud Bus,如何在 /bus/refresh?destination= 中指定多个目的地?
【发布时间】:2017-05-18 11:42:36
【问题描述】:

我有一个使用 Spring Cloud Config 和 Spring Cloud Bus 的配置服务器以及一些也有 Spring Cloud Bus 的客户端。每次更改配置时,我都会使用邮递员将 /bus/refresh 发送到配置服务器。我找到了两种方法:

  1. 刷新特定客户端:http://localhost/bus/refresh/app1:dev:8080
  2. 刷新所有客户端:http://localhost/bus/refresh

有没有办法用一个帖子请求刷新两个特定的客户端?

【问题讨论】:

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


    【解决方案1】:

    如果您想要相同服务的实例,您可以使用http://localhost/bus/refresh/app1:dev:*

    【讨论】:

      【解决方案2】:

      您可以在单个 /bus/refresh?destination URL 中指定多个应用程序名称,并用 & 分隔如下,它将刷新两个特定提及的应用程序(app1 和 app2)的配置:

      http://localhost/bus/refresh?destination=app1:&app2:

      【讨论】:

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