SpringCloud用Zookeeper做服务注册与发现中心代码实现

一:Zookeeper用的是3.5.5版本,SpringBoot用的是2.1.6版本,SpringCloud用的是Greenwich.SR2版本,JDK用的是1.8;

服务提供者product-service代码:(这里注意添加了Zookeeper的Discovery)

https://github.com/Silentdoer/demo-zookeeper-service-provider

服务消费者(服务提供者自己也可以是消费者)order-service代码:(这里注意添加了Zookeeper的Discovery和OpenFeign)

https://github.com/Silentdoer/demo-zookeeper-service-consumer

猜你喜欢

转载自www.cnblogs.com/silentdoer/p/11251943.html