espalemit_re 2021-08-12 19:39 采纳率: 50%
浏览 136

来个人帮一下了 不想加班了

Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'quartzScheduler' defined in class path resource [org/springframework/boot/autoconfigure/quartz/QuartzAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.scheduling.quartz.SchedulerFactoryBean]: Factory method 'quartzScheduler' threw exception; nested exception is java.lang.NoSuchMethodError: org.springframework.scheduling.quartz.SpringBeanJobFactory.setApplicationContext(Lorg/springframework/context/ApplicationContext;)V
2021-08-12 19:32:26.166 [main] INFO c.a.d.p.DruidDataSource - [close,1928] - {dataSource-1} closed
2021-08-12 19:32:26.189 [main] ERROR o.s.b.d.LoggingFailureAnalysisReporter - [report,40] -


APPLICATION FAILED TO START


Description:

An attempt was made to call a method that does not exist. The attempt was made from the following location:

org.springframework.boot.autoconfigure.quartz.QuartzAutoConfiguration.quartzScheduler(QuartzAutoConfiguration.java:75)

The following method did not exist:

org.springframework.scheduling.quartz.SpringBeanJobFactory.setApplicationContext(Lorg/springframework/context/ApplicationContext;)V

The method's class, org.springframework.scheduling.quartz.SpringBeanJobFactory, is available from the following locations:

jar:file:/C:/Users/uuwatch-yanfa/.m2/repository/org/springframework/spring-context-support/3.2.10.RELEASE/spring-context-support-3.2.10.RELEASE.jar!/org/springframework/scheduling/quartz/SpringBeanJobFactory.class

The class hierarchy was loaded from the following locations:

org.springframework.scheduling.quartz.SpringBeanJobFactory: file:/C:/Users/uuwatch-yanfa/.m2/repository/org/springframework/spring-context-support/3.2.10.RELEASE/spring-context-support-3.2.10.RELEASE.jar
org.springframework.scheduling.quartz.AdaptableJobFactory: file:/C:/Users/uuwatch-yanfa/.m2/repository/org/springframework/spring-context-support/3.2.10.RELEASE/spring-context-support-3.2.10.RELEASE.jar

Action:

Correct the classpath of your application so that it contains a single, compatible version of org.springframework.scheduling.quartz.SpringBeanJobFactory

  • 写回答

4条回答 默认 最新

  • CSDN专家-微编程 2021-08-12 20:49
    关注

    jar冲突,去删掉任意一个就行了,看看你的pom.xml是不是有相同的依赖如果有就删掉,另外建议你springboot的版本使用2.1以上的,比如

    <parent>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-parent</artifactId>
            <version>2.5.1</version>
            <relativePath/> <!-- lookup parent from repository -->
        </parent>
    
    评论

报告相同问题?

问题事件

  • 创建了问题 8月12日

悬赏问题

  • ¥15 怎样才能让鼠标沿着线条的中心线轨迹移动
  • ¥60 用visual studio编写程序,利用间接平差求解水准网
  • ¥15 Llama如何调用shell或者Python
  • ¥20 谁能帮我挨个解读这个php语言编的代码什么意思?
  • ¥15 win10权限管理,限制普通用户使用删除功能
  • ¥15 minnio内存占用过大,内存没被回收(Windows环境)
  • ¥65 抖音咸鱼付款链接转码支付宝
  • ¥15 ubuntu22.04上安装ursim-3.15.8.106339遇到的问题
  • ¥15 blast算法(相关搜索:数据库)
  • ¥15 请问有人会紧聚焦相关的matlab知识嘛?