springboot activemq 报错

springboot项目启动报错

org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/operation-and-service]]
Caused by: java.lang.IllegalArgumentException: LoggerFactory is not a Logback LoggerContext but Logback is on the classpath. Either remove Logback or the competing implementation (class org.slf4j.impl.Log4jLoggerFactory loaded from file:/D:/Users/wfq/Desktop/apache-tomcat-8.0.35/webapps/operation-and-service/WEB-INF/lib/activemq-all-5.9.0.jar). If you are using WebLogic you will need to add 'org.slf4j' to prefer-application-packages in WEB-INF/weblogic.xml: org.slf4j.impl.Log4jLoggerFactory

由异常可以看出是activemq引起,改前

		
			org.apache.activemq
			activemq-all
			5.9.0
		

改后

		
			org.springframework.boot
			spring-boot-starter-activemq
		

然后启动就没有以上报错了,究其原因是activemq中集成的很对组件与springboot冲突,springboot-activemq是springboot与activemq联调过没有问题的发布的jar包。

你可能感兴趣的:(SpringBoot)