文章目录
- 1. 现象
- 2. 分析定位
- 3. 解决方案
1. 现象
2. 分析定位
原因:查看依赖项的级联关系,发现rest-high-level-client
这个7.15.2
包,的引用了6.4.3
的rest-client。
3. 解决方案
直接把rest-client包的7.15.2版本
的依赖项加进来就好了。
springboot集成es7
<!-- https://mvnrepository.com/artifact/org.elasticsearch.client/elasticsearch-rest-client --><dependency><groupId>org.elasticsearch.client</groupId><artifactId>elasticsearch-rest-client</artifactId><version>7.15.2</version></dependency><!-- https://mvnrepository.com/artifact/org.elasticsearch/elasticsearch --><dependency><groupId>org.elasticsearch</groupId><artifactId>elasticsearch</artifactId><version>7.15.2</version></dependency><!-- https://mvnrepository.com/artifact/org.elasticsearch.client/elasticsearch-rest-high-level-client --><dependency><groupId>org.elasticsearch.client</groupId><artifactId>elasticsearch-rest-high-level-client</artifactId><version>7.15.2</version></dependency>