2017-08-23 295 views
0

弹簧数据elasticsearch兼容性我能够使用弹簧数据elasticsearch 3.0.0.RC2连接到弹性Serarch 5.5.0与弹簧引导

我想将我的应用程序转换为弹簧启动应用程序。我试图春天引导版本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] 

按以下连结版本矩阵,春天开机不适用于弹性搜寻5版本。

https://github.com/spring-projects/spring-data-elasticsearch/wiki/Spring-Data-Elasticsearch---Spring-Boot---version-matrix

但我觉得这个矩阵过时,因为弹簧数据elasticsearch已经开始支持ElasticSearch-5.5.0

让我知道,如果你能成功运行弹簧数据elasticsearch使用Spring Boot连接到Elastic Search 5。

回答

0

它工作正常,当我升级弹簧引导起动家长2.0.0.M3