首页 文章

Spring Cloud Bus,如何在/ bus / refresh中指定多个目标?destination =?

提问于
浏览
2

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

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

2 回答

  • 0

    你可以在单个/ bus / refresh?目标URL中给出多个应用程序名称,如下所示,它将刷新两个特定提到的应用程序(app1和app2)的配置:

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

  • 1

    如果你想要相同服务的实例,你可以做 http://localhost/bus/refresh/app1:dev:* .

相关问题