初始化
parent
cf2b9e9fc7
commit
379ff5eb22
|
@ -1,28 +0,0 @@
|
|||
package com.muyu.common.xxl.demo;
|
||||
|
||||
import com.xxl.job.core.context.XxlJobHelper;
|
||||
import com.xxl.job.core.handler.annotation.XxlJob;
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Log4j2
|
||||
@Component
|
||||
public class XxlJobDemoService {
|
||||
|
||||
/**
|
||||
* 无参测试
|
||||
*/
|
||||
@XxlJob("xxl-job-demo-no-param")
|
||||
public void xxlJobDemoNoParam(){
|
||||
log.info("调度名称:[{}] - 无参", "xxl-job-demo-no-param");
|
||||
}
|
||||
|
||||
/**
|
||||
* 有参测试
|
||||
*/
|
||||
@XxlJob("xxl-job-demo-one-param")
|
||||
public void xxlJobDemoOneParam(){
|
||||
String param = XxlJobHelper.getJobParam();
|
||||
log.info("调度名称:[{}] - 参数:[{}]", "xxl-job-demo-one-param", param);
|
||||
}
|
||||
}
|
|
@ -1,3 +1,2 @@
|
|||
com.muyu.common.xxl.XXLJobConfig
|
||||
com.muyu.common.xxl.XxlJobProperties
|
||||
com.muyu.common.xxl.demo.XxlJobDemoService
|
Loading…
Reference in New Issue