41. Bus Endpoints
Spring Cloud Bus 提供两个 endpoints,/actuator/bus-refresh
和/actuator/bus-env
,分别对应 Spring Cloud Commons,/actuator/refresh
和/actuator/env
中的各个 actuator endpoints。
41.1 Bus 刷新端点
/actuator/bus-refresh
端点清除RefreshScope
缓存并重新绑定@ConfigurationProperties
。有关更多信息,请参阅刷新范围文档。
要公开/actuator/bus-refresh
端点,您需要在 application 中添加以下 configuration:
management.endpoints.web.exposure.include=bus-refresh
41.2 Bus Env Endpoint
/actuator/bus-env
端点在多个实例中使用指定的 key/value 对更新每个实例环境。
要公开/actuator/bus-env
端点,您需要在 application 中添加以下 configuration:
management.endpoints.web.exposure.include=bus-env
/actuator/bus-env
端点接受具有以下形状的POST
请求:
{
"name": "key1",
"value": "value1"
}