错误信息:
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/F:/.m2/repository/ch/qos/logback/logback-classic/1.1.11/logback-classic-1.1.11.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/F:/.m2/repository/org/apache/activemq/activemq-all/5.9.0/activemq-all-5.9.0.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder]
这是包冲突造成的,从错误信息来看是activemq那里又有一个slf4j的包导致冲突。
但是我在slf4j里面加了
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</exclusion>
</exclusions>
也不能解决问题,原因原来是,他虽然只报了这几个 ,但是你在eclipse的
在这里你可以看见,不知有一个包有这个依赖,因此最好的解决办法就是,在这个页面的右边,右击然后,然工具帮你去除依赖
最后,完美解决,仅此记录,后者注意。