April 2018
Intermediate to advanced
432 pages
10h 38m
English
The usage on the client side is the same as for other Spring Cloud projects related to service discovery. The application main class, or @Configuration class, should be annotated with @EnableDiscoveryClient. The default service name, instance ID, and port are taken from spring.application.name, the Spring Context ID, and server.port, respectively. Sample application source code is available in the GitHub repository at https://github.com/piomin/sample-spring-cloud-zookeeper.git. Fundamentally, it is no different than the sample system introduced for Consul, other than the dependency on Spring Cloud Zookeeper Discovery. It still consists of four microservices, which communicate with each other. Now, after cloning the repository, ...