auto register xxl-job's group and job info.
auto register xxl-job's group and job info.
自动注册xxl-job执行器以及任务
mvn clean install
com.cn.hydra
xxljob-autoregister-spring-boot-starter
0.0.1
springboot项目配置文件application.properties:
…XxlJobSpringExecutor参数配置与之前相同
需要自动注册的方法添加注解@XxlRegister,不加则不会自动注册
@Service
public class TestService {
@XxlJob(value = "testJob")
@XxlRegister(cron = "0 0 0 * * ? *",
author = "hydra",
jobDesc = "测试job")
public void testJob(){
System.out.println("#公众号:码农参上");
}
@XxlJob(value = "testJob222")
@XxlRegister(cron = "59 1-2 0 * * ?",
triggerStatus = 1)
public void testJob2(){
System.out.println("#作者:Hydra");
}
@XxlJob(value = "testJob444")
@XxlRegister(cron = "59 59 23 * * ?")
public void testJob4(){
System.out.println("hello xxl job");
}
}No open issues yet, or sync has not completed.