执行器刷新为 springboot 2.2.7 提供 404 错误

问题描述 投票:0回答:2

我正在尝试使用 springboot 2.2.7 来使用执行器刷新端点。但我遇到了 404 错误。

我的端点是 POST 调用

http://localhost:8080/actuator/refresh

回复:

{ "时间戳": "2020-11-25T11:50:01.172+0000", “状态”:404, “错误”:“未找到”, "message": "没有可用的消息", “路径”:“/执行器/刷新” }

有人可以帮我解决同样的问题吗?在这里卡了快半天了

此执行器刷新仅适用于 Spring Cloud 吗?或者可以用于任何 bean 配置刷新而无需重新启动 pod?

spring-boot refresh spring-boot-actuator
2个回答
0
投票

你可以尝试安装curl-7.76.0-win64-mingw吗 卷曲-XPOST“http://localhost:8080/actuator/refresh”


0
投票

如果您尝试刷新您编写的应用程序,您也可以调用

ctx.getBean(RefreshScope.class).refreshAll();
© www.soinside.com 2019 - 2024. All rights reserved.