spring-attic / spring-cloud-etcd

Apache License 2.0
144 stars 60 forks source link

EtcdHealthIndicator should report out-of-service if spring.cloud.etcd.enabled=false #22

Closed otrosien closed 8 years ago

otrosien commented 8 years ago

Initial shot (don't know for sure about refreshability of etcdProperties) there's also no test suite for this project....

spencergibb commented 8 years ago

I'd rather put a conditional on the autoconfig for spring.cloud.etcd.enabled.

otrosien commented 8 years ago

In other places there is a dedicated property for enabling health checks (e.g. "eureka.client.healthcheck.enabled") https://github.com/spring-cloud/spring-cloud-netflix/blob/master/spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/eureka/EurekaDiscoveryClientConfiguration.java

spencergibb commented 8 years ago

Yup and @ConditionalOnProperty(value = "eureka.client.enabled", matchIfMissing = true) on the whole class.

otrosien commented 8 years ago

I'll have a look into it, and will open a new PR.