【问题标题】:activemq not compatible with spring 4.3.6activemq 与 spring 4.3.6 不兼容
【发布时间】:2017-11-02 13:22:14
【问题描述】:

activemq 与 spring 4.3.6 不兼容。我不能改变弹簧版本。我在 pom.xml 中使用以下依赖项

   <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-jms</artifactId>
        <version>4.3.6.RELEASE</version>
        <exclusions>
            <exclusion>
                <artifactId>commons-logging</artifactId>
                <groupId>commons-logging</groupId>
            </exclusion>
        </exclusions>
    </dependency>
    <!-- ActiveMQ -->
    <dependency>
        <groupId>org.apache.activemq</groupId>
        <artifactId>activemq-all</artifactId>
        <version>5.15.0</version>
    </dependency>

在 activemq 显示依赖于 4.3.9 的地方,我还尝试了依赖于 4.1.9 的 5.14.4。

我该如何解决这个问题。

【问题讨论】:

  • 你为什么使用 all jar 并在不同的 spring dep 中混合?
  • 您可以使用 maven excludes 从 ActiveMQ 依赖项中排除 spring 依赖项。所以你可以控制你想使用的spring JARs
  • @Tim 我应该只使用 activemq-core 吗?

标签: spring maven jms activemq


【解决方案1】:

我只使用了客户端依赖,现在它可以工作了。

   <dependency>
        <groupId>org.apache.activemq</groupId>
        <artifactId>activemq-client</artifactId>
        <version>5.15.0</version>
    </dependency>

这没有弹簧依赖。如果我们使用所有 jar,我们可以使用排除,也可以使用项目所需的特定依赖项。感谢您的帮助。

【讨论】:

    猜你喜欢
    • 2017-10-14
    • 1970-01-01
    • 2017-11-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-12-11
    • 2018-12-20
    • 1970-01-01
    相关资源
    最近更新 更多