问答详情
源自:4-6 5.6 spring jms演示

正确的xml配置文件

<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>


提问者:Mnufs 2018-10-30 15:52

个回答

  • 休对故人思故国
    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>