merge
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
package com.xwbing.configuration;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
|
||||
/**
|
||||
* 说明: 定时任务定时类
|
||||
* 项目名称: sbdemo
|
||||
* 创建时间: 2017/5/10 16:36
|
||||
* 作者: xiangwb
|
||||
*/
|
||||
@Configuration
|
||||
@EnableScheduling // 启用定时任务
|
||||
public class SchedulingConfig {
|
||||
private static final Logger logger = LoggerFactory.getLogger(SchedulingConfig.class);
|
||||
|
||||
@Scheduled(cron = "0 */30 * * * ?") // 每半小时执行一次
|
||||
public void scheduler() {
|
||||
logger.info(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> scheduled ... ");
|
||||
//TODO
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user