如在使用 zookeeper-discovery出现和服务器版本不一致是可以在pom中做如下理:
先使用exclusions标签剔除掉冲突的jar
<dependency>
<groupId>org.springframework.cloud
</groupId>
<artifactId>spring-cloud-starter-zookeeper-discovery
</artifactId>
<exclusions>
<exclusion>
<groupId>org.apache.zookeeper
</groupId>
<artifactId>zookeeper
</artifactId>
</exclusion>
</exclusions>
</dependency>
再次引用你需要的jar
<dependency>
<groupId>org.apache.zookeeper
</groupId>
<artifactId>zookeeper
</artifactId>
<version>3.4.9
</version>
</dependency>