環境:
Spring Cloud : Greenwich.RELEASE
Spring Cloud Config: 2.1.0.RELEASE
Spring Cloud Bus: 2.1.0.RELEASE
Spring Boot: 2.1.3.RELEASE
Spring boot Admin:2.1.3
問題描述:
Spring Cloud Config 通過 Spring Cloud Bus 配置更新.
通過 http://localhost:8888/actuator/bus-refresh 進行重新整理提示 405錯誤
{
"timestamp": "2019-03-26T10:00:07.627+0000",
"status": 405,
"error": "Method Not Allowed",
"message": "Request method 'POST' not supported",
"path": "/actuator/bus-refresh"
}
通過 http://localhost:8888/actuator/ 沒有 bus-refresh 連結 application.yml 也進行了配置
# 開放 bus-refresh 接口,以便配合 bus 實作 配置的動态重新整理
management:
endpoints:
web:
exposure:
include: bus-refresh
最後折騰了很久 發現降到以下版本到沒問題
Spring Cloud: Finchley.SR2
Spring Cloud Config: 2.0.2.RELEASE
Spring Cloud Bus: 2.0.0.RELEASE
Spring Boot: 2.0.8.RELEASE
spring-boot-admin-starter-client:2.0.5
最後發現原來 Spring Boot Admin:2.1.3.RELEASE 和 Spinrg Cloud Bus 2.1.0.RELEASE 最新有沖突
https://github.com/spring-cloud/spring-cloud-bus/issues/151
https://github.com/codecentric/spring-boot-admin/issues/1111