[英]Spring boot 2.6 actuator info
我正在使用执行器,在 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 它返回我 {}
我究竟做错了什么
谢谢
我解决了这个问题,只需在 application.properties 文件中添加
management.info.env.enabled=true
和价值
info.app.name=@project.name@
由/执行器/信息返回
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.