【问题标题】:Spring boot : java.lang.AbstractMethodError: Receiver class org.springframework.jms.config.JmsListenerEndpointRegistry春季启动:java.lang.AbstractMethodError:接收器类 org.springframework.jms.config.JmsListenerEndpointRegistry
【发布时间】:2019-06-25 23:48:48
【问题描述】:

运行 Spring Boot 应用程序时出现以下错误:

java.lang.AbstractMethodError: Receiver class org.springframework.jms.config.JmsListenerEndpointRegistry does not define or inherit an implementation of the resolved method abstract isAutoStartup()Z of interface org.springframework.context.SmartLifecycle.
    at org.springframework.context.support.DefaultLifecycleProcessor.lambda$startBeans$0(DefaultLifecycleProcessor.java:144) ~[spring-context-5.0.12.RELEASE.jar:5.0.12.RELEASE]
    at java.base/java.util.LinkedHashMap.forEach(LinkedHashMap.java:684) ~[na:na]
    at org.springframework.context.support.DefaultLifecycleProcessor.startBeans(DefaultLifecycleProcessor.java:143) ~[spring-context-5.0.12.RELEASE.jar:5.0.12.RELEASE]
    at org.springframework.context.support.DefaultLifecycleProcessor.onRefresh(DefaultLifecycleProcessor.java:122) ~[spring-context-5.0.12.RELEASE.jar:5.0.12.RELEASE]
    at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:883) ~[spring-context-5.0.12.RELEASE.jar:5.0.12.RELEASE]
    at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.finishRefresh(ServletWebServerApplicationContext.java:163) ~[spring-boot-2.0.8.RELEASE.jar:2.0.8.RELEASE]
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:551) ~[spring-context-5.0.12.RELEASE.jar:5.0.12.RELEASE]
    at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:142) ~[spring-boot-2.0.8.RELEASE.jar:2.0.8.RELEASE]
    at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:754) ~[spring-boot-2.0.8.RELEASE.jar:2.0.8.RELEASE]
    at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:386) ~[spring-boot-2.0.8.RELEASE.jar:2.0.8.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:307) ~[spring-boot-2.0.8.RELEASE.jar:2.0.8.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1242) ~[spring-boot-2.0.8.RELEASE.jar:2.0.8.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1230) ~[spring-boot-2.0.8.RELEASE.jar:2.0.8.RELEASE]

【问题讨论】:

  • 你在类路径上有什么版本的spring-jms jar?

标签: java spring spring-boot spring-jms


【解决方案1】:

由于您的类实现了 SmartLifecycle 接口,您需要在您的类中定义 SmartLifecycle 的所有方法。

请参阅此链接中的方法摘要: https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/context/SmartLifecycle.html

【讨论】:

    【解决方案2】:

    对我来说,在构建、执行、部署 -> 构建工具 -> Maven -> 导入以将生成的源文件夹设置为“不检测”中的 IntelliJ 设置中工作

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-06-26
      • 2017-09-11
      • 2015-04-18
      • 2017-06-24
      • 2015-08-22
      • 2015-09-18
      • 2015-03-20
      • 2018-01-24
      相关资源
      最近更新 更多