From 97f3c16ac595493405e8cf76399dc703c088ef6f Mon Sep 17 00:00:00 2001 From: liriming <1343021927@qq.com> Date: 星期二, 03 十二月 2024 15:56:11 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- iailab-module-infra/iailab-module-infra-biz/src/main/java/com/iailab/module/infra/job/demo/DemoJob.java | 62 +++++++++++++++--------------- 1 files changed, 31 insertions(+), 31 deletions(-) diff --git a/iailab-module-infra/iailab-module-infra-biz/src/main/java/com/iailab/module/infra/job/demo/DemoJob.java b/iailab-module-infra/iailab-module-infra-biz/src/main/java/com/iailab/module/infra/job/demo/DemoJob.java index 940d2ba..ac02b86 100644 --- a/iailab-module-infra/iailab-module-infra-biz/src/main/java/com/iailab/module/infra/job/demo/DemoJob.java +++ b/iailab-module-infra/iailab-module-infra-biz/src/main/java/com/iailab/module/infra/job/demo/DemoJob.java @@ -1,31 +1,31 @@ -package com.iailab.module.infra.job.demo; - -import com.iailab.framework.tenant.core.job.TenantJob; -import com.xxl.job.core.handler.annotation.XxlJob; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.stereotype.Component; - -import java.util.Date; -import java.util.concurrent.atomic.AtomicInteger; - -@Component -public class DemoJob { - - private Logger logger = LoggerFactory.getLogger(getClass()); - - private final AtomicInteger counts = new AtomicInteger(); - - private static final Object lock = new Object(); - - - @XxlJob("demoJob") -// @TenantJob - public void execute() { - synchronized (lock) { - logger.info("[execute][定时第 ({}) 次执行]", counts.incrementAndGet()); - System.out.println(new Date() + ": 我是基础设施定时任务"); - } - } - -} +//package com.iailab.module.infra.job.demo; +// +//import com.iailab.framework.tenant.core.job.TenantJob; +//import com.xxl.job.core.handler.annotation.XxlJob; +//import org.slf4j.Logger; +//import org.slf4j.LoggerFactory; +//import org.springframework.stereotype.Component; +// +//import java.util.Date; +//import java.util.concurrent.atomic.AtomicInteger; +// +//@Component +//public class DemoJob { +// +// private Logger logger = LoggerFactory.getLogger(getClass()); +// +// private final AtomicInteger counts = new AtomicInteger(); +// +// private static final Object lock = new Object(); +// +// +// @XxlJob("demoJob") +//// @TenantJob +// public void execute() { +// synchronized (lock) { +// logger.info("[execute][定时第 ({}) 次执行]", counts.incrementAndGet()); +// System.out.println(new Date() + ": 我是基础设施定时任务"); +// } +// } +// +//} -- Gitblit v1.9.3