*************************** 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
說明: 試圖調用不存在的方法。嘗試從如下位置進行: org.springframework.context.annotation.AnnotationConfigUtils.processCommonDefinitionAnnotations(AnnotationConfigUtils.java:259) 如下方法不存在: org.springframework.beans.factory.annotation.AnnotatedBeanDefinition.setRole(I)V 方法的類org.springframework.beans.factory.annotation.AnnotatedBeanDefinition可從如下位置得到: jar:file:/D:/Java/maven/gaou 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úu repository/repository/org/apache/activemq/activemq all/5.14.0/activemq-all-5.14.0.jar!/org/springframework/beans/factory/annotation/AnnotatedBeanDefinition.class 它是從如下位置加載的: 文件:/D:/Java/maven/gaoúu repository/repository/org/springframework/spring beans/5.0.9.RELEASE/spring-beans-5.0.9.RELEASE.jar 行動: 更正應用程序的類路徑,使其包含org.springframework.beans.factory.annotation.AnnotatedBeanDefinition的單一兼容版本
注意: 是jar衝突的問題,由於springboot內置了activemq,只有這兩個其中一個便可java