无法在 spring 引导中找到 JMSContext class

Not able to find JMSContext class in spring boot

下面如何解决

: Failed to introspect Class [org.springframework.jms.connection.SingleConnectionFactory] from ClassLoader [sun.misc.Launcher$AppClassLoader@2a139a55]

Caused by: java.lang.NoClassDefFoundError: javax/jms/JMSContext

Pom.xml

<parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.3.12.RELEASE</version>

    </parent>

<dependency>
    <groupId>com.solace.spring.boot</groupId>
    <artifactId>solace-jms-spring-boot-starter</artifactId>
    <version>4.1.0</version>
    
</dependency>

您似乎缺少 javax-jms 依赖项,如果您使用的是 maven,请尝试添加以下内容:

<dependency>
    <groupId>javax.jms</groupId>
    <artifactId>javax.jms-api</artifactId>
    <version>2.0.1</version>
</dependency>