只引入spring-boot-starter-data-elasticsearch并指定版本idea下载不成功,找不到指定的版本。
解决方法:引入下面的两个包
<dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-data-elasticsearch</artifactId></dependency><dependency><groupId>org.elasticsearch.client</groupId><artifactId>elasticsearch-rest-client-sniffer</artifactId><version>${elasticsearch}</version></dependency>
再在properties中配置elasticsearch版本
<properties><java.version>1.8</java.version><elasticsearch>7.6.1</elasticsearch></properties>