标签:frame spring port import ack config esc 任务 .config
package com.kfit.base.scheduling;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
/**
* 定时任务
* @author Administrator
*
*/
@Configuration
@EnableScheduling
public class SchedulingConfig {
@Scheduled(cron = "0/20 * * * * ?") // 每20秒执行一次
public void scheduler() {
System.out.println(">>>>>>>>> SchedulingConfig.scheduler()");
}
}
标签:frame spring port import ack config esc 任务 .config
原文地址:http://www.cnblogs.com/zhengzhouyang/p/7700842.html