有没有人成功让 Spring Boot、Spring Data Elasticsearch 和 Elasticsearch 5.x 工作?
我更新了我的 pom 以使用 spring-data-elasticsearch 3.0.0.RELEASE(刚刚发布),它在 Github 中有提交说明,说它支持 ES 5。
我遇到了一些错误,这些错误是由于没有声明对spring-data-common
. 在没有版本的情况下添加后,我注意到它显然是由 Spring Boot 管理的,并且引入了 1.13.7.RELEASE
这引起:java.lang.NoClassDefFoundError: org/springframework/data/mapping/model/Property
然后我升级spring-data-common
到 2.0.0.RELEASE,认为所有东西的最新版本都应该兼容。当存储库连接时,这会导致 AbstractMethodError 异常。
任何人都可以提供任何提示吗?这是我的 POM 的依赖项
Managed versions from Parent POM:
<spring-boot.version>1.5.7.RELEASE</spring-boot.version>
<spring-cloud.version>Dalston.RELEASE</spring-cloud.version>
From POM from the child module where things don't work
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-config</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-commons</artifactId>
<!-- <version>2.0.0.RELEASE</version> -->
</dependency>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-elasticsearch</artifactId>
<version>3.0.0.RELEASE</version>
</dependency>
<dependency>
<groupId>org.elasticsearch</groupId>
<artifactId>elasticsearch</artifactId>
<version>5.5.0</version>
</dependency>
<dependency>
<groupId>org.elasticsearch.client</groupId>
<artifactId>transport</artifactId>
<version>5.5.0</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
</dependencies>