linux - 获取 java.lang.noclassdefounderror : org. springframework/amqp/core/corelation

标签 linux spring-boot spring-amqp spring-messaging

我的 spring_boot_version 是 '2.0.5.RELEASE',spring_version = '4.3.8.RELEASE' 并且我正在为 rabbit mq 运行的 spring 依赖项是:

 compile("org.springframework.boot:spring-boot-starter-websocket:$spring_boot_version") {
        exclude group: "org.springframework.boot", module: "spring-boot-starter-logging"
    }
    compile "org.springframework.boot:spring-boot-starter-log4j2:$spring_boot_version"
    compile("org.springframework.amqp:spring-rabbit:2.1.4.RELEASE") {
        exclude group: "org.springframework.boot", module: "spring-boot-starter-logging"
    }
    compile "org.codehaus.jackson:jackson-mapper-asl:1.9.13"
    compile "org.apache.logging.log4j:log4j-web:2.7"

该应用程序在我的本地计算机上运行良好,但在 linux 服务器上将 spring boot 服务器作为 systemd 服务运行时出现此错误。 如何在服务器级别解决此问题?

最佳答案

我会推荐 org.springframework.boot:spring-boot-starter-amqp 而不是 spring-rabbit 因为你使用的是 spring boot。

您看到的错误可能是因为您还需要添加 org.springframework.amqp:spring-amqp

关于linux - 获取 java.lang.noclassdefounderror : org. springframework/amqp/core/corelation,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55584819/

相关文章:

linux - centos 7 挂载网盘 : mount error(13): Permission denie

python - Linux 上的 mysqlclient pip 失败

linux - 使用 svn diff 命令

Spring boot (Netflix) Eureka 副本

java - 异步 Spring 远程处理 (AMQP) 客户端

java - spring boot rabbitmq MappingJackson2MessageConverter 自定义对象转换

java - Drools 5.1.1 意外的累积和收集行为

c++ - Linux 中的 Cout 和 Cin - 看不到控制台

spring-boot - 由于工厂已定义而无法初始化组件

java - 使用 Redis 在 Spring Boot 中将对象添加到 Http Session 失败