异常:org.apache.zookeeper.ZooKeeper.<init>(Ljava/lang/String;ILorg/apache/zookeeper/Watcher;Z)V
原因:有不同版本的zookeeper的jar包引入所致
解决:在pom.xml中添加
<exclusions>
<exclusion> <groupId>org.apache.zookeeper</groupId> <artifactId>zookeeper</artifactId> </exclusion> </exclusions>或者
在Dependency Hierarchy中,右击要去掉的版本——Exclude Maven Artifact...