正确的xml配置文件

来源:4-6 5.6 spring jms演示

Mnufs

2018-10-30 15:52

<properties>
    <spring.version> 4.2.5.RELEASE </spring.version>
</properties>

<dependencies>
    <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.11</version>
        <scope>test</scope>
    </dependency>

    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-context</artifactId>
        <version>${spring.version}</version>
    </dependency>

    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-jms</artifactId>
        <version>${spring.version}</version>
    </dependency>

    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-test</artifactId>
        <version>${spring.version}</version>
    </dependency>

    <dependency>
        <groupId>org.apache.activemq</groupId>
        <artifactId>activemq-core</artifactId>
        <version>5.7.0</version>
        <exclusions>
            <exclusion>
                <groupId>org.springframework</groupId>
                <artifactId>spring-context</artifactId>
            </exclusion>
        </exclusions>
    </dependency>
</dependencies>


写回答 关注

1回答

  • 休对故人思故国
    2018-11-29 09:26:13

    我这样配置,启动后报了Caused by: java.lang.NoClassDefFoundError: javax/jms/JMSContext的错,经查询又增加了以下依赖:

    <dependency>

        <groupId>javax.jms</groupId>

        <artifactId>javax.jms-api</artifactId>

        <version>2.0.1</version>

    </dependency>


Java消息中间件

使用Java消息中间件处理异步消息

54146 学习 · 144 问题

查看课程

相似问题