logjobbean.java
来自「《精通Spring》源代码」· Java 代码 · 共 41 行
JAVA
41 行
/*
* Created on 2004-11-14
*
* http://www.open-v.com 提供代码的维护工作
*/
package com.openv.spring;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.scheduling.quartz.QuartzJobBean;
/**
* LogJobBean
*
* @author luoshifei
*/
public class LogJobBean extends QuartzJobBean {
protected static final Log log = LogFactory.getLog(LogJobBean.class);
private int timeout;
/**
* 设置超时时间
*
* @param timeout
*/
public void setTimeout(int timeout) {
log.info("setTimeout().........");
this.timeout = timeout;
}
protected void executeInternal(JobExecutionContext arg0)
throws JobExecutionException {
log.info("Creating LogJobBean()..........");
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?