在springboot中添加elasticsearch5.4.1的驱动的时候错误 Caused by: java.lang.ClassNotFoundException: org.elasticsearch.plugins.NetworkPlugin 我就很纳闷了,在其他的项目都好好的,怎么来的springboot就出现class没有找到
直接去maven的本地仓库看看,发现elasticsearch的版本既然是2.4.6 怪不得会找不class。这个可能是因为spring data elasticsearch 智能引入的jar,修改maven的配置就可以了
?xml version="1.0" encoding="UTF-8"?4.0.0com.ting.elasticcore0.0.1-SNAPSHOTjardemoelastic mongodb test demoorg.springframework.bootspring-boot-starter-parent1.5.8.RELEASEUTF-8UTF-81.85.4.1org.springframework.bootspring-boot-starter-data-mongodborg.springframework.bootspring-boot-starter-data-redisorg.projectlomboklomboktrueorg.springframework.bootspring-boot-starter-testtestorg.elasticsearchelasticsearch5.4.1org.elasticsearch.clienttransport${elasticsearch.versoin}org.apache.logging.log4jlog4j-api2.8.2org.apache.logging.log4jlog4j-core2.8.2org.springframework.bootspring-boot-maven-pluginmaven-compiler-plugin3.1trueC:\Program Files\Java\jdk1.8.0_131\bin\javac.exe