代碼參考:blog.csdn.net/pengjunlee/…spring
事件:按照如上配置以後,項目正常啓動,能夠添加Job,可是Job一直沒有被executespringboot
緣由:springboot2.0以後與原生quartz包不兼容,必須使用spring-boot-starter-quartz包spring-boot
刪除pom配置:spa
<dependency>
<groupId>org.quartz-scheduler</groupId>
<artifactId>quartz</artifactId>
<version>2.2.3</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context-support</artifactId>
</dependency>
複製代碼
增長pom配置:.net
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-quartz</artifactId>
</dependency>
複製代碼