我的 Spring Cloud Config Client 依赖于spring.cloud.starter.bus.amqp,但它仍然没有启用/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")
Run Code Online (Sandbox Code Playgroud)
我的配置客户端应用程序中有这些依赖项,但仍然没有启用/bus/refresh, /bus/env.
请让我知道我的客户端应用程序中缺少什么。
笔记:
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
Run Code Online (Sandbox Code Playgroud)
我已尝试在 , 中application.yml或application.properties在 , 使用时设置这些指标BusAutoConfiguration以启用/bus/*端点。
@ConditionalOnProperty(value = "endpoints.spring.cloud.bus.refresh.enabled", matchIfMissing = true)
Run Code Online (Sandbox Code Playgroud)
在我的 Spring Cloud Config Server 应用程序中,我禁用了这些端点,即设置为 false
endpoints.spring.cloud.bus.refresh.enabled: false
endpoints.spring.cloud.bus.env.enabled: false
Run Code Online (Sandbox Code Playgroud)
并观察到在 Spring Boot 启动期间/bus/*没有启用端点。