我有一个使用本地弹性搜索和 Spring Boot Actuator 2.1.2 的 Spring Boot 应用程序,仅用于度量目的。现在我需要实现一个默认的健康检查,所以我在我的配置 application.properties 类中打开它,如下所示:
management.endpoints.web.exposure.include=...,health
management.endpoint.health.show-details=never
它工作正常,我可以使用默认实现调用http://localhost/actuator/health来实现健康状态。
但是有一个时刻我不喜欢。我发现每次当我得到一个不详细的答案时,比如{"status":"UP"}
执行器都会在
ElasticsearchHealthIndicator.doHealthCheck(Health.Builder builder)
我打算摆脱无用的电话。
我可以以某种方式仅禁用此呼叫吗?