spring-cloud / spring-cloud-consul

Spring Cloud Consul
http://cloud.spring.io/spring-cloud-consul/
Apache License 2.0
813 stars 541 forks source link

Do not supply discovery client when Consul discovery client disabled #786

Closed ryanjbaxter closed 2 years ago

ryanjbaxter commented 2 years ago

Fixes #785

ryanjbaxter commented 2 years ago

@spencergibb let me know what you think about this change....the other option is to continue to return null but then we will also need fix ConfigServerInstanceProvider to handle the null function. Ultimately the end result is the same...an IllegalStateException will be thrown withe the same error message indicating not being able to find the config server.

xhuy-le commented 2 years ago

@ryanjbaxter I'm wondering if we should extend these changes to other discovery client implementations that could suffer the same problem (Zookeeper, Kubernetes, ...) ?

ryanjbaxter commented 2 years ago

@xhuy-le yes I will make corresponding changes in Zookeeper and Netflix as well