问题描述:
使用以下命令刷新配置中心服务端:
curl -X POST "http://localhost:3344/actuator/bus-refresh"
出现405错误:
{"timestamp":"2022-04-07T07:23:58.153+00:00","status":405,"error":"Method Not Allowed","trace":"org.springframework.web.HttpRequestMethodNotSupportedException: Request method 'POST' not supported\r\n\tat org.springframework.web.servlet.mvc.method.
问题解决:
将原来的配置命令修改成下命令
curl -X POST "http://localhost:3344/actuator/busrefresh"
问题分析:
访问http://localhost:3344/actuator返回结果进行分析,最新链接已经修改为busrefresh,所以修改配置命令即可;
{
"_links": {
"self": {
"href": "http://localhost:3344/actuator",
"templated": false
},
"busrefresh-destinations": {
"href": "http://localhost:3344/actuator/busrefresh/{*destinations}",
"templated": true
},
"busrefresh": {
"href": "http://localhost:3344/actuator/busrefresh",
"templated": false
}
}
}