kaiyu
2021-06-10 ddebb2ea352012c10ec31a9d9774b0320af4caac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package com.moral.api.jobHandler;
 
import org.springframework.stereotype.Component;
 
import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.context.XxlJobHelper;
import com.xxl.job.core.handler.annotation.XxlJob;
 
@Component
public class TestHandler{
 
    @XxlJob("testJobHandler")
    public ReturnT<String> execute(){
        //执行器传参
        String param = XxlJobHelper.getJobParam();
        System.out.println(param);
        System.out.println("定时任务测试");
        return ReturnT.SUCCESS;
    }
 
}