该版本仍在开发中,尚未被视为稳定。对于最新稳定版,请使用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 LoadBalancer 中。你可以在 Spring Cloud Commons 文档中阅读如何设置它。