***************************
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.context.annotation.AnnotationConfigUtils.processCommonDefinitionAnnotations(AnnotationConfigUtils.java:259)
The following method did not exist:
org.springframework.beans.factory.annotation.AnnotatedBeanDefinition.setRole(I)V
The method's class, org.springframework.beans.factory.annotation.AnnotatedBeanDefinition, is available from the following locations:
jar:file:/D:/Java/maven/gao_repository/repository/org/springframework/spring-beans/5.0.9.RELEASE/spring-beans-5.0.9.RELEASE.jar!/org/springframework/beans/factory/annotation/AnnotatedBeanDefinition.class
jar:file:/D:/Java/maven/gao_repository/repository/org/apache/activemq/activemq-all/5.14.0/activemq-all-5.14.0.jar!/org/springframework/beans/factory/annotation/AnnotatedBeanDefinition.class
It was loaded from the following location:
file:/D:/Java/maven/gao_repository/repository/org/springframework/spring-beans/5.0.9.RELEASE/spring-beans-5.0.9.RELEASE.jar
Action:
Correct the classpath of your application so that it contains a single, compatible version of org.springframework.beans.factory.annotation.AnnotatedBeanDefinition
出現這種情況一般都是jar包依賴問題(有可能父子依賴版本不一致造成的),jar包沖突或者jar包的版本有問題,你可以這樣操作
maven插件右擊子項目,再點擊 show dependenices,如下圖,1查看沖突地方,2依賴圖放大.
查看哪些jar包有沖突,解決沖突