我想在我的应用程序中使用 logback slf4j 实现,但是 activemq-all 通过包含 log4j 实现类破坏了类路径。我不是唯一面临这个问题的人,例如 multiple SLF4J bindings Error with activemq-all-5.6.0.jar .根据那篇文章,我必须将 activemq-all 替换为
org.apache.activemq:activemq-camel
org.apache.activemq:activemq-core
org.apache.activemq:activemq-console
org.apache.activemq:activemq-jaas
org.apache.activemq:activemq-optional
org.apache.activemq:kahadb
org.apache.geronimo.specs:geronimo-jms_1.1_spec
org.apache.geronimo.specs:geronimo-jta_1.0.1B_spec
org.apache.geronimo.specs:geronimo-j2ee-management_1.1_spec
org.apache.geronimo.specs:geronimo-annotation_1.0_spec.
问题是我没有这些 Artifact 的完整 maven 依赖项(组 ID、 Artifact ID、版本)。有人可以为我提供现成的替代品吗
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-all</artifactId>
<version>5.9.0</version>
</dependency>
最佳答案
您可以使用 active mq 核心库。请注意,active mq 向后兼容客户端。
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-core</artifactId>
<version>5.4.3</version>
<exclusions>
<exclusion>
<artifactId>org.slf4j</artifactId>
<groupId>slf4j-log4j12</groupId>
</exclusion>
<exclusion>
<artifactId>log4j</artifactId>
<groupId>log4j</groupId>
</exclusion>
</exclusions>
</dependency>
关于maven - activemq-all 强制我使用 log4j slf4j 实现,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24755775/