健康 (health)
原文:https://docs.spring.io/spring-boot/api/rest/actuator/health.html
health 端点提供应用健康的详细信息。
检索应用健康状态
向 /actuator/health 发出 GET 请求:
$ curl 'http://localhost:8080/actuator/health' -i -X GET \ -H 'Accept: application/json'
响应包含:
status:整体状态(UP、DOWN、OUT_OF_SERVICE、UNKNOWN)。components:健康组件映射,每个组件包含status和可选的details。groups:健康组(如 liveness、readiness)。
详情和组件的显示由 management.endpoint.health.show-details 和 show-components 属性控制。还可以按特定组件或组查询,例如 /actuator/health/liveness 和 /actuator/health/readiness。