Commit e526e2b8 by 雷紫添

添加任务调度类

parent dc032a5f
package com.founder.task;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
@Component
public class ScheduleTask {
private SimpleDateFormat format=new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
private Logger logger= LoggerFactory.getLogger(ScheduleTask.class);
@Scheduled(cron = "1 1 1 1/1 * ? ")
public void taskForDictUpdate(){
logger.info("This is a say method!"+format.format(new Date()));
xxbsSerevice();
}
private void xxbsSerevice(){
//1.从表中获取未上报的信息
//2..将从采集平台获取的信息,在发送给公安部
// JSONObject jsonResult= requestByPost("http://api.xz.xz.ga/jccj/xxbs",jccj);
//更新写日志
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment