无法访问 Spring Boot Actuator“/actuator”端点

新手上路,请多包涵

I am able to access endpoints like http://localhost:8081/health , /status , /env , /metrics , /shutdown but not /actuator/loginfo 端点。

低于异常。

 {"timestamp":1455929182552,"status":404,"error":"Not Found","message":"No message available","path":"/actuator"}

如何访问 http://localhost:8081/actuator 端点?

原文由 grkhyd 发布,翻译遵循 CC BY-SA 4.0 许可协议

阅读 835
1 个回答

从 Spring Boot 版本 2.0.1 开始,使用以下属性将起作用

management.endpoints.web.exposure.include=<comma separated endpoints you wish to expose>

如果您不关心安全性,您可以使用 * 通配符在 Web 上公开所有执行器端点。

端点似乎也已从以前的版本中移出。例如。如果您想使用 bean,您现在将拥有 /actuator/beans 端点。

只是为了确保查看此类端点的启动日志。

更多关于端点的信息可以在 这里 找到

原文由 Shanu Gupta 发布,翻译遵循 CC BY-SA 4.0 许可协议

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题