首页>代码>Spring2.6配置java quartz1.6定时任务>/quartzWithSpring/src/com/sundoctor/example/service/MyQuartzJobBean.java
package com.sundoctor.example.service;

import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.quartz.Trigger;
import org.springframework.scheduling.quartz.QuartzJobBean;

public class MyQuartzJobBean extends QuartzJobBean {

	private SimpleService simpleService;
	
	public void setSimpleService(SimpleService simpleService) {
		this.simpleService = simpleService;
	}

	@Override
	protected void executeInternal(JobExecutionContext jobexecutioncontext) throws JobExecutionException {
		Trigger trigger = jobexecutioncontext.getTrigger();
		String triggerName = trigger.getName();		
		simpleService.testMethod(triggerName);
	}

}
最近下载更多
denliv_hui  LV13 2021年10月21日
fuzhilong  LV11 2021年1月22日
如柴骨瘦假胸硅胶  LV11 2021年1月13日
httperror404  LV2 2020年12月8日
zuiaizhihou  LV1 2020年11月10日
flygrass  LV12 2020年4月10日
rayshao  LV5 2020年2月19日
luohaipeng  LV23 2019年12月3日
frank1103  LV4 2019年11月15日
yliu123  LV9 2019年11月12日
最近浏览更多
我们都是小怪兽  LV3 2023年2月17日
浪里格朗  LV4 2023年1月31日
最代码-宋家辉  LV61 2023年1月29日
Hachi6  LV13 2022年12月4日
1234mama  LV19 2022年3月14日
学习指南  LV5 2022年1月2日
denliv_hui  LV13 2021年10月21日
denliv_hui  LV13 2021年10月21日
denliv_hui  LV13 2021年10月21日
a1w4fsdaf  LV9 2021年7月11日
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友