forumarchivesjob.java
来自「天乙虚拟社区8.05版本。只支持Mysql」· Java 代码 · 共 41 行
JAVA
41 行
package com.laoer.bbscs.service.scheduling;
import org.apache.log4j.Logger;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.scheduling.quartz.QuartzJobBean;
import com.laoer.bbscs.exception.BbscsException;
import com.laoer.bbscs.service.ForumArchivesService;
public class ForumArchivesJob extends QuartzJobBean {
/**
* Logger for this class
*/
private static final Logger logger = Logger.getLogger(ForumArchivesJob.class);
private ForumArchivesService forumArchivesService;
public ForumArchivesService getForumArchivesService() {
return forumArchivesService;
}
public void setForumArchivesService(ForumArchivesService forumArchivesService) {
this.forumArchivesService = forumArchivesService;
}
@Override
protected void executeInternal(JobExecutionContext arg0) throws JobExecutionException {
try {
logger.info("###存档###");
this.getForumArchivesService().createForumArchives();
logger.info("###存档结束###");
} catch (BbscsException e) {
logger.error(e);
}
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?