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