【发布时间】:2018-02-01 02:26:18
【问题描述】:
我能够使用 spring-data-elasticsearch 3.0.0.RC2 连接到 Elastic Serarch 5.5.0。
我想将我的应用程序转换为 Spring Boot 应用程序。我尝试了 Spring Boot 版本 2.0.0.M2 ,但出现以下错误
Caused by: java.lang.NoSuchMethodError: org.springframework.data.elasticsearch.c
ore.mapping.ElasticsearchPersistentProperty.findAnnotation(Ljava/lang/Class;)Lja
va/lang/annotation/Annotation;
at org.springframework.data.elasticsearch.core.mapping.SimpleElasticsear
chPersistentEntity.addPersistentProperty(SimpleElasticsearchPersistentEntity.jav
a:157) ~[spring-data-elasticsearch-3.0.0.RC2.jar!/:?]
at org.springframework.data.elasticsearch.core.mapping.SimpleElasticsear
chPersistentEntity.addPersistentProperty(SimpleElasticsearchPersistentEntity.jav
a:47) ~[spring-data-elasticsearch-3.0.0.RC2.jar!/:?]
at org.springframework.data.mapping.context.AbstractMappingContext$Persi
stentPropertyCreator.createAndRegisterProperty(AbstractMappingContext.java:559)
~[spring-data-commons-2.0.0.M4.jar!/:?]
at org.springframework.data.mapping.context.AbstractMappingContext$Persi
stentPropertyCreator.doWith(AbstractMappingContext.java:528) ~[spring-data-commo
ns-2.0.0.M4.jar!/:?]
at org.springframework.util.ReflectionUtils.doWithFields(ReflectionUtils
.java:727) ~[spring-core-5.0.0.RC2.jar!/:5.0.0.RC2]
根据以下链接版本矩阵,Spring Boot 不适用于 Elastic Search 5 版本。
但我觉得这个矩阵已经过时了,因为 spring-data-elasticsearch 已经开始支持 ElasticSearch-5.5.0
如果您可以使用 Spring Boot 成功运行连接到 Elastic Search 5 的 spring-data-elasticsearch,请告诉我。
【问题讨论】:
标签: elasticsearch spring-boot spring-data-elasticsearch