我有一个使用Spring Cloud Config和Spring Cloud Bus的配置服务器以及一些也有Spring Cloud Bus的客户端 . 每次我更改配置时,我都会使用邮递员发送/总线/刷新到配置服务器 . 我找到了两种方法:
刷新特定客户端:http://localhost/bus/refresh/app1:dev:8080
刷新所有客户:http://localhost/bus/refresh
有没有办法用单个帖子请求刷新两个特定的客户?
你可以在单个/ bus / refresh?目标URL中给出多个应用程序名称,如下所示,它将刷新两个特定提到的应用程序(app1和app2)的配置:
http://localhost/bus/refresh?destination=app1: &app2:
如果你想要相同服务的实例,你可以做 http://localhost/bus/refresh/app1:dev:* .
http://localhost/bus/refresh/app1:dev:*
2 回答
你可以在单个/ bus / refresh?目标URL中给出多个应用程序名称,如下所示,它将刷新两个特定提到的应用程序(app1和app2)的配置:
http://localhost/bus/refresh?destination=app1: &app2:
如果你想要相同服务的实例,你可以做
http://localhost/bus/refresh/app1:dev:*
.