如果本身服务已经引入了依赖直接从第三步开始即可,并且第四步也不需要添加执行器.
1.引入依赖
com.xuxueli
xxl-job-core
2.3.0
2.添加配置(xxl.job.executor.appname 应该是每个服务有一个唯一的名字,端口也是唯一的)
### xxl-job admin address list, such as "http://address" or "http://address01,http://address02"
xxl.job.admin.addresses=http://172.168.101.16:8082/xxl-job-admin
### xxl-job, access token
xxl.job.accessToken=
### xxl-job executor appname
xxl.job.executor.appname=test-demo
### 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.port=7998
### xxl-job executor log-path 日志路径
xxl.job.executor.logpath=/data/applogs/xxl-job/jobhandler
### xxl-jo