SpringCloudConfig使用actuatorbus-refresh出现“status“: 405,“error“: “Method Not Allowed“ Post not allow

SpringCloudConfig使用actuatorbus-refresh出现“status“: 405,“error“: “Method Not Allowed“ Post not allow,第1张

SpringCloudConfig使用/actuator/bus-refresh出现“status“: 405,“error“: “Method Not Allowed“ Post not allow

最近在研究SpringCloud,这应该是最新版本了吧,网上资料较少,记一下在使用SpringCloud Config自动更新配置spring-cloud-starter-bus-amqp时遇到的一个问题,与诸君共勉。

2021.0.0
2.6.2

自动配置时调用/actuator/bus-refresh接口,用POST方式时产生以下错误

{
    "timestamp": "2022-01-01T14:42:41.767+00:00",
    "status": 405,
    "error": "Method Not Allowed",
    "path": "/actuator/bus-refresh"
}

后台服务报这个错误

Resolved [org.springframework.web.HttpRequestMethodNotSupportedException: Request method 'POST' not supported]

这是因为版本更新的缘故,新版本应该使用/actuator/busrefresh,就不存在问题了。在网上找了好久没发现正解,希望能帮到大家。

哎。。。版本问题真是坑人,整了我一个晚上。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/zaji/5692651.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-12-17
下一篇 2022-12-17

发表评论

登录后才能评论

评论列表(0条)

保存