springboot:整合ES两种方式(ES已经剔除了类似jpa

2022-04-11  本文已影响0人  盗生一

https://blog.csdn.net/weixin_45029526/article/details/109362037

springboot:整合ES两种方式
第一种:
<dependency>
<groupId>org.elasticsearch.client</groupId>
<artifactId>elasticsearch-rest-high-level-client</artifactId>
<version>7.1.1</version>
</dependency>
<dependency>
<groupId>org.elasticsearch.client</groupId>
<artifactId>elasticsearch-rest-client</artifactId>
<version>{elasticsearch.version}</version> <exclusions> <exclusion> <artifactId>commons-logging</artifactId> <groupId>commons-logging</groupId> </exclusion> </exclusions> </dependency> <dependency> <groupId>org.elasticsearch</groupId> <artifactId>elasticsearch</artifactId> <version>{elasticsearch.version}</version>
</dependency>
第二种:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-elasticsearch</artifactId>
</dependency>
最好第第一种

上一篇下一篇

猜你喜欢

热点阅读