actuator/bus-refresh 405 Method Not Allowed

{
“timestamp”: “2019-03-26T10:00:07.627+0000”,
“status”: 405,
“error”: “Method Not Allowed”,
“message”: “Request method ‘POST’ not supported”,
“path”: “/actuator/bus-refresh”
}

web路径也做了暴露配置:
management:
endpoints:
web:
exposure: #暴露 揭露
include: “*”
但是还是报405

最后发现是spring boot 以及spring cloud的版本太高了
当时创建的时候是在idea里面直接生成的spring-cloud-config,
idea直接给干到最新的版本了

后来把spring boot版本调到2.0.3.RELEASE
spring cloud 版本调到Finchley.RELEASE

在启动配置中心的时候就会有以下log:
在这里插入图片描述

再访问actuator/bus-refresh,就不报错了

配置通过总线刷新,只需在配置中心服务应用上访问如下链接,就能通知所有应用:
http://localhost:3301/actuator/bus-refresh

如果只想让某个应用更新:
http://localhost:3301/actuator/bus-refresh/pay-center:8086

其中3301是配置中心的端口
pay-center是具体的应用名
8086是pay-center中某个启动的应用的具体端口

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值