On this page
43. Bus 端点
Spring Cloud Bus 提供了两个端点/actuator/bus-refresh和/actuator/bus-env,它们分别对应于 Spring Cloud Commons 中的各个 Actuator 端点/actuator/refresh和/actuator/env。
43.1Bus 刷新端点
/actuator/bus-refresh端点清除RefreshScope缓存并重新绑定@ConfigurationProperties。有关更多信息,请参见Refresh Scope文档。
要公开/actuator/bus-refresh端点,您需要向应用程序中添加以下配置:
management.endpoints.web.exposure.include=bus-refresh
43.2Bus 环境端点
/actuator/bus-env端点使用多个实例之间的指定键/值对更新每个实例环境。
要公开/actuator/bus-env端点,您需要向应用程序中添加以下配置:
management.endpoints.web.exposure.include=bus-env
/actuator/bus-env端点接受具有以下形状的POST请求:
{
"name": "key1",
"value": "value1"
}