[英]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.