springboot 2.0 config client 刷新问题(Post给http://localhost:8080/refresh,返回的是404错误)

当手动修改了SpringBoot 2.0 Config Client的配置后,通过HTTP POST请求`http://localhost:8080/refresh`未能成功刷新配置,返回404错误。问题可能在于Config Client未正确暴露刷新端点。解决方案是在Config Client配置文件中添加暴露`/actuator/refresh`端点,然后使用Postman发送POST请求到`http://localhost:8080/actuator/refresh`进行刷新。
摘要由CSDN通过智能技术生成

问题:

手动修改config-client.properties的内容后,刷新 config Server URL:  http://localhost:8888/config-client/default/master, 修改的内容可以被显示过来,

但是刷新config client URL: http://localhost:8080/, 看到的还是修改前的内容。

尝试用postman发消息给http://localhost:8080/refresh, 然后再刷新http://localhost:8080/, 看到的还是修改前的内容。没有变化。

而且Posthttp://localhost:8080/refresh返回的是404错误

解决:

网上一顿搜,发现有的是post给server 有的是post给client,但是都不好使。

尝试一下URL均不好使
http://localhost:8080/refresh
http://localhost:8080/actuator/bus-refresh
http://localhost:8888/actuator/bus-refresh

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值