对于最新稳定版,请使用Spring Cloud Zookeeper 5.0.0spring-doc.cadn.net.cn

使用 Spring Cloud Zookeeper 搭配 Spring Cloud 组件

Feign、Spring Cloud Gateway 和 Spring Cloud LoadBalancer 都支持 Spring Cloud Zookeeper。spring-doc.cadn.net.cn

Spring Cloud 负载均衡器搭配 Zookeeper

Spring Cloud Zookeeper 提供了 Spring Cloud LoadBalancer 的实现ServiceInstanceListSupplier. 当你使用春云启动者Zookeeper 发现Spring Cloud 负载均衡器自动配置为使用ZookeeperServiceInstanceListSupplier默认。spring-doc.cadn.net.cn

如果你之前在Zookeeper中使用StickyRule,现在的套路中会是它的替代品 是SameInstancePreferenceServiceInstanceListSupplier在SC负载均衡器中。你可以在Spring Cloud Commons的文档里阅读如何设置它。