如何禁用spring启动执行器弹性搜索健康请求?

如何禁用spring启动执行器弹性搜索健康请求?,spring,spring-boot,actuator,Spring,Spring Boot,Actuator,我有一个spring boot应用程序,它使用本地弹性搜索和spring boot Actuator 2.1.2,仅用于度量目的。现在我需要实现一个默认的运行状况检查,所以我在configuration application.properties类中将其打开,如下所示: management.endpoints.web.exposure.include=...,health management.endpoint.health.show-details=never 它工作正常,我可以使用默认

我有一个spring boot应用程序,它使用本地弹性搜索和spring boot Actuator 2.1.2,仅用于度量目的。现在我需要实现一个默认的运行状况检查,所以我在configuration application.properties类中将其打开,如下所示:

management.endpoints.web.exposure.include=...,health
management.endpoint.health.show-details=never
它工作正常,我可以使用默认的实现调用实现健康状态

但有一刻我不喜欢。我发现每次当我得到一个不详细的答案时,比如
{“status”:“UP”}
执行器都会在

ElasticsearchHealthIndicator.doHealthCheck(Health.Builder builder)
我正计划摆脱无用的电话


是否可以以某种方式仅禁用此调用?

在application.properties文件中尝试使用以下属性

management.health.elasticsearch.enabled=false

我不能这样做,因为我在度量中使用了HealthIndicator bean。将此属性设置为false将导致bean依赖项错误。我希望有一个办法来处理它通过一些定制的医疗服务。。。