This version is still in development and is not considered stable yet. For the latest stable version, please use spring-cloud-bus 4.1.3!spring-doc.cn

Bus Endpoints

Spring Cloud Bus provides three endpoints, /actuator/busrefresh, /actutator/busshutdown and /actuator/busenv that correspond to individual actuator endpoints in Spring Cloud Commons, /actuator/refresh, /actuator/shutdown, and /actuator/env respectively.spring-doc.cn

Bus Refresh Endpoint

The /actuator/busrefresh endpoint clears the RefreshScope cache and rebinds @ConfigurationProperties. See the Refresh Scope documentation for more information.spring-doc.cn

To expose the /actuator/busrefresh endpoint, you need to add following configuration to your application:spring-doc.cn

management.endpoints.web.exposure.include=busrefresh

Bus Env Endpoint

The /actuator/busenv endpoint updates each instances environment with the specified key/value pair across multiple instances.spring-doc.cn

To expose the /actuator/busenv endpoint, you need to add following configuration to your application:spring-doc.cn

management.endpoints.web.exposure.include=busenv

The /actuator/busenv endpoint accepts POST requests with the following shape:spring-doc.cn

{
	"name": "key1",
	"value": "value1"
}

Bus Shutdown Endpoint

The /actuator/busshutdown shuts down the application gracefully.spring-doc.cn

To expose the /actuator/busshutdown endpoint, you need to add following configuration to your application:spring-doc.cn

management.endpoints.web.exposure.include=busshutdown

You can make a request to the busshutdown endpoint by issuing a POST request.spring-doc.cn

If you would like to target a specific application you can issue a POST request to /busshutdown and optionally specify the bus id:spring-doc.cn

$ curl -X POST http://localhost:8080/actuator/busshutdown

You can also target a specific application instance by specifying the bus id:spring-doc.cn

$ curl -X POST http://localhost:8080/actuator/busshutdown/busid:123