1. 部署xxl-job
(1)从官网下载xxl-job的源代码
(2)部署修改配置文件,主要是数据库配置
(3)打包部署
2. xxl-job 依赖包
<dependency>
<groupId>com.xuxueli</groupId>
<artifactId>xxl-job-core</artifactId>
<version>2.3.0</version>
</dependency>
3. 配置文件:
# xxl-job admin address list, such as "http://address" or "http://address01,http://address02" 第一步xxl-job部署地址
xxl.job.admin.addresses=http://10.0.127.1:8010/xxl-job-admin
# xxl-job, access token
xxl.job.accessToken=default_token
# xxl-job executor appname
xxl.job.executor.appname=systemname
# xxl-job executor registry-address: default use address to registry , otherwise use ip:port if address is null
xxl.job.executor.address=
# xxl-job executor server-info
xxl.job.executor.ip=
# xxl-job executor log-path 项目往xxl-job注册的端口,随便定义 没被使用即可
xxl.job.executor.port=9999
# xxl-job executor log-path
xxl.job.executor.logpath=/data/applogs/xxl-job/jobhandler
# xxl-job executor log-retention-days
xxl.job.executor.logretentiondays=30