提交 | 用户 | 时间
|
516ef4
|
1 |
package com.iailab.module.shasteel.job.task; |
L |
2 |
|
|
3 |
import org.slf4j.Logger; |
|
4 |
import org.slf4j.LoggerFactory; |
|
5 |
import org.springframework.stereotype.Component; |
|
6 |
|
|
7 |
/** |
|
8 |
* 测试定时任务(演示Demo,可删除) |
|
9 |
* |
|
10 |
* testTask为spring bean的名称 |
|
11 |
* |
|
12 |
* @author Mark sunlightcs@gmail.com |
|
13 |
*/ |
|
14 |
@Component("testTask") |
|
15 |
public class TestTask implements ITask{ |
|
16 |
private Logger logger = LoggerFactory.getLogger(getClass()); |
|
17 |
|
|
18 |
@Override |
|
19 |
public void run(String params){ |
|
20 |
logger.debug("TestTask定时任务正在执行,参数为:{}", params); |
|
21 |
} |
|
22 |
} |