es低版本,链接阿里云上的es需要使用账户密码,
使用 x-pack-transport的5.6.1的版本时
<!-- elasticsearch -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-elasticsearch</artifactId>
</dependency>
<dependency>
<groupId>org.elasticsearch.client</groupId>
<artifactId>x-pack-transport</artifactId>
<version>5.6.1</version>
</dependency>
报如下错误
Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: org/elasticsearch/xpack/XPackPlugin
在pom文件中添加一下配置
<repository>
<id>elasticsearch-releases</id>
<url>https://artifacts.elastic.co/maven</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>