A, SpringBoot integrate Quartz

1. Create

 

 

 

 

A, SpringBoot integration of basic dependence of Quartz introduced SpringBoot

 

 

 1, rely on the introduction of

 

 

 

 

 2, simple tasks like writing

 

3, create a task scheduling classes

 

 4, create a task scheduling method

 

 5, write trigger

 

FixedDelay N seconds after the beginning end of a

FixedRate the start n seconds after the start of a

N second delay initialDelay first start

cron expression is complex scheduling cycle website https://qqe2.com/cron

 

 

 

 

 

Two, SpringBoot integration Mybatis

create

 

 

 

 Dependent basis

 

 

1, the first step in adding mybatis and mysql dependence

 

 

2, and a second step of configuring the data source scanning alias + xml

 

 

3, the third step to create entry point - scan interface packet Mapper

 

 

 4. The fourth step to create a project structure test code

 

5, the fifth step adding a log, the display operation sql

 

 

Guess you like

Origin www.cnblogs.com/wbl-176/p/12512597.html