springboot整合 elasticjob 3.x 启动报错 Error creating bean with name ‘zookeeperRegistryCenter‘
Failed to introspect bean class [org.apache.shardingsphere.elasticjob.reg.zookeeper.ZookeeperRegistryCenter]Caused by: java.lang.NoClassDefFoundError: org/apache/curator/framework/recipes/cache/Curato
·
Failed to introspect bean class [org.apache.shardingsphere.elasticjob.reg.zookeeper.ZookeeperRegistryCenter]
Caused by: java.lang.NoClassDefFoundError: org/apache/curator/framework/recipes/cache/CuratorCache
Caused by: java.lang.ClassNotFoundException: org.apache.curator.framework.recipes.cache.CuratorCache
原因
spring-boot-starter-parent
版本太低,无法推荐到合适的curator
版本
解决方法
pom
文件添加,指定版本, 5.1.0
为高版本spring-boot-starter-parent
推荐的版本
<dependency>
<groupId>org.apache.curator</groupId>
<artifactId>curator-recipes</artifactId>
<version>5.1.0</version>
</dependency>
<dependency>
<groupId>org.apache.curator</groupId>
<artifactId>curator-framework</artifactId>
<version>5.1.0</version>
</dependency>
更多推荐
已为社区贡献1条内容
所有评论(0)