首页>代码>spring动态配置定时器quartz2.x教程详解>/dynamic-job/src/main/java/com/dynamic/job/factory/QuartzJobFactory.java
package com.dynamic.job.factory; import org.quartz.Job; import org.quartz.JobExecutionContext; import org.quartz.JobExecutionException; public class QuartzJobFactory implements Job { public void execute(JobExecutionContext context) throws JobExecutionException { System.out.println("任务成功运行"); ScheduleJob scheduleJob = (ScheduleJob) context.getMergedJobDataMap().get("scheduleJob"); System.out.println("任务名称 = [" + scheduleJob.getJobName() + "]"); } }
最近下载更多