天道酬勤,学无止境

多任务只执行一次

Springboot(2.2.2)+Mybatis-Plus(3.0-RC3)+shedLock

Main structure selection Springboot(2.2.2)+Mybatis-Plus(3.0-RC3)+shedLock(4.0.1) Development considerations Q&A 1、 ShedLock 部署时需要创建表 (特别注意不同库创建的sql) Mysql: CREATE TABLE shedlock( name VARCHAR(64), lock_until TIMESTAMP(3) NULL, locked_at TIMESTAMP(3) NULL, locked_by VARCHAR(255), PRIMARY KEY (name) ) Oracel: DROP TABLE ICC_UNION.SHEDLOCK CASCADE CONSTRAINTS; CREATE TABLE SHEDLOCK ( name VARCHAR2(64 CHAR), lock_until TIMESTAMP, locked_at TIMESTAMP, locked_by VARCHAR2(255 CHAR), PRIMARY KEY (name) ); @SchedulerLock(name = "任务名称 不要重复", lockAtMostFor = "见下", lockAtLeastFor ="见下") /** *You can also

2021-03-27 00:09:13    分类:博客    shedLock   springboot定时任务   多任务只执行一次   Java相关