Modify the timed tasks created using quartz in the springboot project

What is Quratz:

Quartz is an open source job scheduling framework written entirely in Java that provides a simple yet powerful mechanism for job scheduling in Java applications.
Quartz can be combined with J2EE and J2SE applications or used alone.
Quartz allows program developers to schedule jobs based on time intervals.
Quartz implements a many-to-many relationship between jobs and triggers, and can also associate multiple jobs with different triggers.

Create a springboot project to integrate Quratz:

Create a project based on springboot 2.7.* in IDEA, integrate Quratz, and check the Quratz Scheduler under I/O; the
insert image description here
dependency of Quratz in pom.xml after creation is

 <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-quartz</artifactId>
        </dependency>
         <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>

Because of the need to write interface services, spr is introduced

Guess you like

Origin blog.csdn.net/weixin_42551921/article/details/127578248