zhuguifei
2025-04-28 442928123f63ee497d766f9a7a14f0a6ee067e25
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
 
package org.jeecg.modules.demo.xxljob;
 
import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
 
 
/**
 * xxl-job定时任务测试
 */
@Component
@Slf4j
public class TestJobHandler {
 
 
    /**
     * 简单任务
     *
     * @param params
     * @return
     */
 
    @XxlJob(value = "testJobHandler")
    public ReturnT<String> JobHandler(String params) {
        log.info("我是demo服务里的定时任务testJob,我执行了..............................."+params);
        return ReturnT.SUCCESS;
    }
 
    public void init() {
        log.info("init");
    }
 
    public void destroy() {
        log.info("destory");
    }
 
}