docs(quartz): 更新定时任务相关类的文档注释
This commit is contained in:
+5
-1
@@ -16,14 +16,18 @@
|
||||
package cn.odboy.framework.quartz.core;
|
||||
|
||||
import cn.odboy.framework.context.KitSpringBeanHolder;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.concurrent.Callable;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.util.ReflectionUtils;
|
||||
|
||||
/**
|
||||
* 执行定时任务
|
||||
* 带返回值的线程
|
||||
*
|
||||
* @author odboy
|
||||
*/
|
||||
@Slf4j
|
||||
public class QuartzRunnable implements Callable<Object> {
|
||||
|
||||
+6
@@ -22,8 +22,14 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.ApplicationArguments;
|
||||
import org.springframework.boot.ApplicationRunner;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 应用初始化完毕后,注册定时任务
|
||||
*
|
||||
* @author odboy
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
public class ActiveJobRegister implements ApplicationRunner {
|
||||
|
||||
+6
@@ -35,12 +35,18 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import org.quartz.JobExecutionContext;
|
||||
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
|
||||
import org.springframework.scheduling.quartz.QuartzJobBean;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.Future;
|
||||
|
||||
/**
|
||||
* 任务定义,继承QuartzJobBean是固定写法
|
||||
*
|
||||
* @author odboy
|
||||
*/
|
||||
@Slf4j
|
||||
public class ExecutionJobBean extends QuartzJobBean {
|
||||
|
||||
|
||||
+6
@@ -32,8 +32,14 @@ import org.quartz.TriggerBuilder;
|
||||
import org.quartz.TriggerKey;
|
||||
import org.quartz.impl.triggers.CronTriggerImpl;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 定时任务管理工具(高耦合版)
|
||||
*
|
||||
* @author odboy
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
public class QuartzManage {
|
||||
|
||||
Reference in New Issue
Block a user