java-base-app/文档/定时任务/xxl-job说明.txt

9 lines
696 B
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

1. 要开启 xxl-job 定时任务需要打开 application.yml 中的 xxl-job 配置项。
2. 在 application.properties 配置文件中配置 xxl.job.admin.addresses该配置为 xxl-job 调度系统的访问地址,以便于定时任务执行节点进行注册。
3. 在对应的实际要处理业务的类添加 @Component 标记为组件,以被 spring 进行加载管理。
4. 在对应的实际要处理业务的类方法添加 @XxlJob("组件名称") 标记为 xxl-job 的执行入口,并且 xxl-job 管理后台 任务管理 配置任务时, JobHandler 填写 @XxlJob 注解中的组件名称。
测试环境:
http://101.200.218.207:9999/xxl-job-admin/user
admin
JoB@HZs20220506