Is it possible to deactivate MongoHealthIndicator in the Springboot spring actuator health endpoint? -
in springboot project work on there transitive maven dependency on spring-data-mongodb. therefore mongohealthindicator seems activated automatically although project not use mongodb. possible deactivate healthindicator without deactivating actuator health endpoint? workaround found excluding dependency. wondering if possible specific deactivation of mongohealthindicator.
from:
http://docs.spring.io/spring-boot/docs/current/reference/html/common-application-properties.html
# health indicators (previously health.*) ... management.health.mongo.enabled=true ...
you should able set false disable health indicator. org.springframework.boot.actuate.autoconfigure.healthindicatorautoconfiguration.java
@configuration @conditionalonbean(mongotemplate.class) @conditionalonproperty(prefix = "management.health.mongo", name = "enabled", matchifmissing = true) public static class mongohealthindicatorconfiguration {
Comments
Post a Comment