springboot整合elasticsearch启动时报错
先贴下报错信息***************************APPLICATION FAILED TO START***************************Description:An attempt was made to call a method that does not exist. The attempt was made from the following lo
·
先贴下报错信息
***************************
APPLICATION FAILED TO START
***************************
Description:
An attempt was made to call a method that does not exist. The attempt was made from the following location:
org.springframework.boot.autoconfigure.data.AbstractRepositoryConfigurationSourceSupport$AutoConfiguredAnnotationRepositoryConfigurationSource.<init>(AbstractRepositoryConfigurationSourceSupport.java:128)
The following method did not exist:
org.springframework.data.repository.config.AnnotationRepositoryConfigurationSource.<init>(Lorg/springframework/core/type/AnnotationMetadata;Ljava/lang/Class;Lorg/springframework/core/io/ResourceLoader;Lorg/springframework/core/env/Environment;Lorg/springframework/beans/factory/support/BeanDefinitionRegistry;Lorg/springframework/beans/factory/support/BeanNameGenerator;)V
The method's class, org.springframework.data.repository.config.AnnotationRepositoryConfigurationSource, is available from the following locations:
jar:file:/D:/ProgramTool/mavenRepository/org/springframework/data/spring-data-commons/2.1.5.RELEASE/spring-data-commons-2.1.5.RELEASE.jar!/org/springframework/data/repository/config/AnnotationRepositoryConfigurationSource.class
It was loaded from the following location:
file:/D:/ProgramTool/mavenRepository/org/springframework/data/spring-data-commons/2.1.5.RELEASE/spring-data-commons-2.1.5.RELEASE.jar
Action:
Correct the classpath of your application so that it contains a single, compatible version of org.springframework.data.repository.config.AnnotationRepositoryConfigurationSource
查了下该类中的方法截图如下
发现调用方法的参数个数不对呀,到这里怀疑时jar包版本问题。
但是spring data elasticsearch 2.2.2中自带的spring-data-commons 的版本时2.1.5.。。。有点坑
和spring-boot版本不对应,。
于是:
排除自带的,升级下这个版本,
到此,问题解决,启动正常……

魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。
更多推荐
所有评论(0)