Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
X

xxl-job-auto-register

> 编程语言
Open source

auto register xxl-job's group and job info.

199 stars0 likes0 views
WebsiteGitHub

About

auto register xxl-job's group and job info.

xxljob-autoregister-spring-boot-starter


自动注册xxl-job执行器以及任务

1、打包

mvn clean install

2、项目中引入

xml

    com.cn.hydra
    xxljob-autoregister-spring-boot-starter
    0.0.1

3、配置

springboot项目配置文件application.properties:

…

XxlJobSpringExecutor参数配置与之前相同

4、添加注解

需要自动注册的方法添加注解@XxlRegister,不加则不会自动注册

java
@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");
    }
}

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Java

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 18, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言