【视频 & 交流平台】
http://study.163.com/course/introduction.htm?courseId=1004329008&utm_campaign=commission&utm_source=400000000155061&utm_medium=share
http://study.163.com/course/introduction.htm?courseId=1004638001&utm_campaign=commission&utm_source=400000000155061&utm_medium=share
https://gitee.com/happyangellxq520/spring-boot
http://412887952-qq-com.iteye.com/blog/2321532
本文介绍在 Spring Boot 中如何使用定时任务,使用非常简单,就不做过多说明了。
com.kfit.base.scheduling.SchedulingConfig:
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()");
}
}
【视频&交流平台】
http://study.163.com/course/introduction.htm?courseId=1004329008
http://study.163.com/course/introduction.htm?courseId=1004638001
https://gitee.com/happyangellxq520/spring-boot
http://412887952-qq-com.iteye.com/blog/2321532
网易云课堂视频最新更新:
第十一章 Spring Boot 日志
1、spring boot日志—理论
2、Spring Boot日志-logback
3、Spring Boot日志-log4j2
第十二章 Spring Boot 知识点2
1、spring boot 服务配置和部署
2、Spring Boot 定制URL匹配规则