springboot 使用elasticsearch-rest-high-level-client操作 es


https://mp.weixin.qq.com/s/fgi6Xd1Xbs4RJSDGBRcZxQ

https://mp.weixin.qq.com/s/ug2w0aOw_XPqILMJZkrssA

es7.x以上的版本引用了6.8的elasticsearch-rest-client包会出现java.lang.ClassNotFoundException: org.elasticsearch.client.Cancellable

需要将其exclude,引入7.x版本的。

implementation('org.elasticsearch.client:elasticsearch-rest-high-level-client:7.12.1') {
    exclude group: 'org.elasticsearch.client', module: 'elasticsearch-rest-client'
}
implementation 'org.elasticsearch:elasticsearch:7.12.1'
implementation 'org.elasticsearch.client:elasticsearch-rest-client:7.12.1'

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM