My Spring Cloud Config Client has dependency to spring.cloud.starter.bus.amqp, but it is still not enabling /bus/refresh endpoint
build.gradle
compile("org.springframework.cloud:spring-cloud-starter-stream-rabbit:1.1.3.RELEASE")
compile("org.springframework.cloud:spring-cloud-starter-bus-amqp:1.2.2.RELEASE")
I have these dependencies in my config client application, but still not enabling /bus/refresh, /bus/env.
Please let me know what am I missing in my client application.
Note:
spring.cloud.bus.refresh.enabled: true
spring.cloud.bus.env.enabled: true
endpoints.spring.cloud.bus.refresh.enabled: true
endpoints.spring.cloud.bus.env.enabled: true
I have tried setting up these indicators in application.yml or application.properties as these are used by BusAutoConfiguration,
to enable /bus/* endpoints.
@ConditionalOnProperty(value = "endpoints.spring.cloud.bus.refresh.enabled", matchIfMissing = true)
In my Spring Cloud Config Server application I have disabled these endpoints, i.e., set to false
endpoints.spring.cloud.bus.refresh.enabled: false
endpoints.spring.cloud.bus.env.enabled: false
and observed that during Spring Boot startup /bus/* endpoints are not being enabled.
Did you map client's url to
/bus/refresh? I believe it's mapped to/refreshby default.You could also try sending a POST request to client app at:
I also believe you might not need
spring-cloud-starter-stream-rabbitdependency, justspring-cloud-starter-bus-amqp.BTW I published a detailed post with working demo at: Refreshable Configuration using Spring Cloud Config Server, Spring Cloud Bus, RabbitMQ and Git that might help you as a starting point.