Using Spring Cloud Zookeeper
Spring Cloud supports various products used as a part of the microservices architecture. You can find this out when reading this chapter where Consul has been compared with Eureka as a discovery tool, and with Spring Cloud Config as a distributed configuration tool. Zookeeper is another solution that might serve as an alternative choice to those listed previously. As with Consul, it can be used for both service discovery and distributed configuration. To enable Spring Cloud Zookeeper in the project, you should include the spring-cloud-starter-zookeeper-discovery
starter for the service discovery feature, or spring-cloud-starter-zookeeper-config
for the configuration server feature. Alternatively, you may declare a spring-cloud-starter-zookeeper-all
dependency that activates all functionalities for the application. Don't forget to include spring-boot-starter-web
, which is still required to provide web functionality:
<dependency> <groupId>org.springframework...