Class ZookeeperHealthAutoConfiguration
java.lang.Object
org.springframework.cloud.zookeeper.ZookeeperHealthAutoConfiguration
@Configuration(proxyBeanMethods=false)
@ConditionalOnClass(org.springframework.boot.actuate.endpoint.annotation.Endpoint.class)
@AutoConfigureAfter(ZookeeperAutoConfiguration.class)
public class ZookeeperHealthAutoConfiguration
extends Object
Auto
Configuration for adding a Zookeeper health endpoint to actuator if
required.- Since:
- 2.0.1
- Author:
- Tom Gianos
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionzookeeperHealthIndicator(org.apache.curator.framework.CuratorFramework curator) If there is an active curator, if the zookeeper health endpoint is enabled and if a health indicator hasn't already been added by a user add one.
-
Constructor Details
-
ZookeeperHealthAutoConfiguration
public ZookeeperHealthAutoConfiguration()
-
-
Method Details
-
zookeeperHealthIndicator
@Bean @ConditionalOnMissingBean(ZookeeperHealthIndicator.class) @ConditionalOnBean(org.apache.curator.framework.CuratorFramework.class) @ConditionalOnEnabledHealthIndicator("zookeeper") public ZookeeperHealthIndicator zookeeperHealthIndicator(org.apache.curator.framework.CuratorFramework curator) If there is an active curator, if the zookeeper health endpoint is enabled and if a health indicator hasn't already been added by a user add one.- Parameters:
curator- The curator connection to zookeeper to use- Returns:
- An instance of
ZookeeperHealthIndicatorto add to actuator health report
-