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

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

<spring-cloud.version>2021.0.0</spring-cloud.version>
<spring-boot.version>2.6.2</spring-boot.version>

自动配置时调用/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,就不存在问题了。在网上找了好久没发现正解,希望能帮到大家。

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

  • 8
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 3
    评论
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值