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"
}