【发布时间】:2021-11-26 11:24:56
【问题描述】:
我正在使用执行器,在 application.properties 文件中我有以下字段
management.endpoints.web.exposure.include=health,info
management.endpoint.info.enabled=true
management.info.defaults.enabled=true
当我调用我看到的 url / 执行器时
{"_links":{"self":{"href":"https://localhost:8443/actuator","templated":false},"health":{"href":"https://localhost:8443/actuator/health","templated":false},"health-path":{"href":"https://localhost:8443/actuator/health/{*path}","templated":true},"info":{"href":"https://localhost:8443/actuator/info","templated":false}}}
但是当我调用 / actuator / info 时,它会返回给我 {}
我做错了什么
谢谢
【问题讨论】:
-
"info":{"href":"localhost:8443/actuator/info","templated":false} --> 该字段显示值,它应该返回 {"templated":false} 值,您在日志中看到任何错误吗?或者只是清除浏览器缓存并再次点击。
-
我正在使用 curl no nho cache 进行调用,并且日志中没有错误。
-
如果您在浏览器中点击 url,您会得到预期的响应吗?
-
并不总是一个空对象
-
意味着你只会得到一些空对象?
标签: java spring-boot spring-boot-actuator