【发布时间】:2019-09-12 23:28:36
【问题描述】:
我将如何在 SpringBoot 中实现自定义端点以实现以下目标:
http://localhost:8080/actuator/health/custom
“自定义”是我想要实现的扩展健康的端点。
【问题讨论】:
标签: java endpoint spring-boot-actuator health-monitoring
我将如何在 SpringBoot 中实现自定义端点以实现以下目标:
http://localhost:8080/actuator/health/custom
“自定义”是我想要实现的扩展健康的端点。
【问题讨论】:
标签: java endpoint spring-boot-actuator health-monitoring
该 url 用于公开应用程序的健康检查,如果这是您的情况,您只需要包含执行器的依赖项:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
你可以看到应用的状态。
如果您需要更具体的内容,只需配置依赖项,如您所见 here .
您还可以覆盖运行状况检查的行为,但该依赖项具有很多功能。
【讨论】: