|
|
|
@ -1,7 +1,9 @@
|
|
|
|
|
package cn.estsh.i3plus.core.apiservice.schedulejob;
|
|
|
|
|
|
|
|
|
|
import cn.estsh.impp.framework.base.BaseImppScheduleJob;
|
|
|
|
|
import cn.estsh.impp.framework.boot.core.ApplicationProperties;
|
|
|
|
|
import cn.estsh.impp.framework.boot.quartz.job.ImppJob;
|
|
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
|
|
import org.quartz.Job;
|
|
|
|
|
import org.quartz.JobExecutionContext;
|
|
|
|
|
import org.quartz.JobExecutionException;
|
|
|
|
@ -11,20 +13,22 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @Description :
|
|
|
|
|
* @Description : 定时任务
|
|
|
|
|
* @Reference :
|
|
|
|
|
* @Author : alwaysfrin
|
|
|
|
|
* @CreateDate : 2018-09-30 13:25
|
|
|
|
|
* @Modify:
|
|
|
|
|
**/
|
|
|
|
|
public class DemoJob implements Job {
|
|
|
|
|
@ApiOperation("定时任务demo")
|
|
|
|
|
public class DemoJob extends BaseImppScheduleJob {
|
|
|
|
|
public static final Logger LOGGER = LoggerFactory.getLogger(DemoJob.class);
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
public ApplicationProperties applicationProperties;
|
|
|
|
|
|
|
|
|
|
public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
|
|
|
|
|
public DemoJob() {
|
|
|
|
|
super(DemoJob.class,"定时任务demo");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void executeImppJob(JobExecutionContext context, ApplicationProperties applicationProperties) {
|
|
|
|
|
LOGGER.info("projectName:{},port:{}",applicationProperties.getApplicationName(),applicationProperties.getServerPort());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|