我的 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/