【优化】底层通讯超时时间支持自定义,默认3S;可参考 xxl-job-admin 和 samples 示例代码自行配置;

2.5.0
xuxueli 8 months ago
parent b20110ad31
commit 86d26c8793

@ -843,11 +843,13 @@ XXL-JOB是一个分布式任务调度平台其核心设计目标是开发迅
#### 步骤一:调度中心配置: #### 步骤一:调度中心配置:
调度中心配置文件地址: 调度中心配置文件地址:
```
/xxl-job/xxl-job-admin/src/main/resources/application.properties /xxl-job/xxl-job-admin/src/main/resources/application.properties
```
调度中心配置内容说明: 调度中心配置内容说明:
```
### 调度中心JDBC链接链接地址请保持和 2.1章节 所创建的调度数据库的地址一致 ### 调度中心JDBC链接链接地址请保持和 2.1章节 所创建的调度数据库的地址一致
spring.datasource.url=jdbc:mysql://127.0.0.1:3306/xxl_job?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&serverTimezone=Asia/Shanghai spring.datasource.url=jdbc:mysql://127.0.0.1:3306/xxl_job?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&serverTimezone=Asia/Shanghai
spring.datasource.username=root spring.datasource.username=root
@ -867,6 +869,9 @@ XXL-JOB是一个分布式任务调度平台其核心设计目标是开发迅
### 调度中心通讯TOKEN [选填]:非空时启用; ### 调度中心通讯TOKEN [选填]:非空时启用;
xxl.job.accessToken= xxl.job.accessToken=
### 调度中心通讯超时时间[选填]单位秒默认3s
xxl.job.timeout=3
### 调度中心国际化配置 [必填] 默认为 "zh_CN"/中文简体, 可选范围为 "zh_CN"/中文简体, "zh_TC"/中文繁体 and "en"/英文; ### 调度中心国际化配置 [必填] 默认为 "zh_CN"/中文简体, 可选范围为 "zh_CN"/中文简体, "zh_TC"/中文繁体 and "en"/英文;
xxl.job.i18n=zh_CN xxl.job.i18n=zh_CN
@ -876,7 +881,7 @@ XXL-JOB是一个分布式任务调度平台其核心设计目标是开发迅
### 调度中心日志表数据保存天数 [必填]过期日志自动清理限制大于等于7时生效否则, 如-1关闭自动清理功能 ### 调度中心日志表数据保存天数 [必填]过期日志自动清理限制大于等于7时生效否则, 如-1关闭自动清理功能
xxl.job.logretentiondays=30 xxl.job.logretentiondays=30
```
#### 步骤二:部署项目: #### 步骤二:部署项目:
@ -931,15 +936,21 @@ docker run -e PARAMS="--spring.datasource.url=jdbc:mysql://127.0.0.1:3306/xxl_jo
#### 步骤二:执行器配置 #### 步骤二:执行器配置
执行器配置,配置文件地址: 执行器配置,配置文件地址:
```
/xxl-job/xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/resources/application.properties /xxl-job/xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/resources/application.properties
```
执行器配置,配置内容说明: 执行器配置,配置内容说明:
```
### 调度中心部署根地址 [选填]:如调度中心集群部署存在多个地址则用逗号分隔。执行器将会使用该地址进行"执行器心跳注册"和"任务结果回调";为空则关闭自动注册; ### 调度中心部署根地址 [选填]:如调度中心集群部署存在多个地址则用逗号分隔。执行器将会使用该地址进行"执行器心跳注册"和"任务结果回调";为空则关闭自动注册;
xxl.job.admin.addresses=http://127.0.0.1:8080/xxl-job-admin xxl.job.admin.addresses=http://127.0.0.1:8080/xxl-job-admin
### 执行器通讯TOKEN [选填]:非空时启用; ### 调度中心通讯TOKEN [选填]:非空时启用;
xxl.job.accessToken= xxl.job.admin.accessToken=default_token
### 调度中心通讯超时时间[选填]单位秒默认3s
xxl.job.admin.timeout=3
### 执行器AppName [选填]:执行器心跳注册分组依据;为空则关闭自动注册 ### 执行器AppName [选填]:执行器心跳注册分组依据;为空则关闭自动注册
xxl.job.executor.appname=xxl-job-executor-sample xxl.job.executor.appname=xxl-job-executor-sample
@ -953,7 +964,7 @@ docker run -e PARAMS="--spring.datasource.url=jdbc:mysql://127.0.0.1:3306/xxl_jo
xxl.job.executor.logpath=/data/applogs/xxl-job/jobhandler xxl.job.executor.logpath=/data/applogs/xxl-job/jobhandler
### 执行器日志文件保存天数 [选填] 过期日志自动清理, 限制值大于等于3时生效; 否则, 如-1, 关闭自动清理功能; ### 执行器日志文件保存天数 [选填] 过期日志自动清理, 限制值大于等于3时生效; 否则, 如-1, 关闭自动清理功能;
xxl.job.executor.logretentiondays=30 xxl.job.executor.logretentiondays=30
```
#### 步骤三:执行器组件配置 #### 步骤三:执行器组件配置
@ -2402,14 +2413,15 @@ public void execute() {
### 7.36 版本 v2.5.0 Release Notes[规划中] ### 7.36 版本 v2.5.0 Release Notes[规划中]
- 1、【优化】框架基础守护线程异常处理逻辑优化避免极端情况下因Error导致调度终止问题 - 1、【优化】框架基础守护线程异常处理逻辑优化避免极端情况下因Error导致调度终止问题
- 2、【优化】部分系统日志优化,提升可读性 - 2、【优化】底层通讯超时时间支持自定义默认3S可参考 xxl-job-admin 和 samples 示例代码自行配置
- 3、【重构】调度线程任务信息更新逻辑优化避免极端情况下已关闭任务被启动问题 - 3、【重构】调度线程任务信息更新逻辑优化避免极端情况下已关闭任务被启动问题
- 5、【重构】执行器注册逻辑重构降低多调度中心地址时并发注册问题注册表“xxl_job_registry”新增唯一索引避免冗余注册信息存储 - 4、【重构】执行器注册逻辑重构降低多调度中心地址时并发注册问题注册表“xxl_job_registry”新增唯一索引避免冗余注册信息存储
- 5、【优化】部分系统日志优化提升可读性
- 6、【优化】合并PR-3616代码结构注释优化 - 6、【优化】合并PR-3616代码结构注释优化
- 7、【优化】合并PR-3619避免调度过程中任务停止边界情况处理逻辑 - 7、【优化】合并PR-3619避免调度过程中任务停止边界情况处理逻辑
- 8、【优化】合并PR-3605避免子任务是任务本身导致死循环 - 8、【优化】合并PR-3605避免子任务是任务本身导致死循环
- 9、【修复】合并PR-3585修复全局密码长度不一致问题 - 9、【修复】合并PR-3585修复全局密码长度不一致问题
- 10、【优化】合并PR-3518列别名反引号包裹,提升跨数据迁移兼容性; - 10、【优化】合并PR-3518SQL列别名反引号包裹,提升跨数据迁移兼容性;
- 11、【优化】合并PR-3518、PR-3400日志表索引优化提升大日志量情况下日志查询及清理速度 - 11、【优化】合并PR-3518、PR-3400日志表索引优化提升大日志量情况下日志查询及清理速度
- 12、[规划中]登陆态Token声称逻辑优化混淆登陆时间属性降低token泄漏风险 - 12、[规划中]登陆态Token声称逻辑优化混淆登陆时间属性降低token泄漏风险
- 13、[规划中]升级springboot3.x解决2.x老版本漏洞类问题。注意springboot3.x依赖jdk17 - 13、[规划中]升级springboot3.x解决2.x老版本漏洞类问题。注意springboot3.x依赖jdk17

@ -55,6 +55,9 @@ public class XxlJobAdminConfig implements InitializingBean, DisposableBean {
@Value("${xxl.job.accessToken}") @Value("${xxl.job.accessToken}")
private String accessToken; private String accessToken;
@Value("${xxl.job.timeout}")
private int timeout;
@Value("${spring.mail.from}") @Value("${spring.mail.from}")
private String emailFrom; private String emailFrom;
@ -98,6 +101,10 @@ public class XxlJobAdminConfig implements InitializingBean, DisposableBean {
return accessToken; return accessToken;
} }
public int getTimeout() {
return timeout;
}
public String getEmailFrom() { public String getEmailFrom() {
return emailFrom; return emailFrom;
} }

@ -92,7 +92,9 @@ public class XxlJobScheduler {
} }
// set-cache // set-cache
executorBiz = new ExecutorBizClient(address, XxlJobAdminConfig.getAdminConfig().getAccessToken()); executorBiz = new ExecutorBizClient(address,
XxlJobAdminConfig.getAdminConfig().getAccessToken(),
XxlJobAdminConfig.getAdminConfig().getTimeout());
executorBizRepository.put(address, executorBiz); executorBizRepository.put(address, executorBiz);
return executorBiz; return executorBiz;

@ -3,13 +3,13 @@ server.port=8080
server.servlet.context-path=/xxl-job-admin server.servlet.context-path=/xxl-job-admin
### actuator ### actuator
management.server.servlet.context-path=/actuator management.server.base-path=/actuator
management.health.mail.enabled=false management.health.mail.enabled=false
### resources ### resources
spring.mvc.servlet.load-on-startup=0 spring.mvc.servlet.load-on-startup=0
spring.mvc.static-path-pattern=/static/** spring.mvc.static-path-pattern=/static/**
spring.resources.static-locations=classpath:/static/ spring.web.resources.static-locations=classpath:/static/
### freemarker ### freemarker
spring.freemarker.templateLoaderPath=classpath:/templates/ spring.freemarker.templateLoaderPath=classpath:/templates/
@ -21,13 +21,6 @@ spring.freemarker.settings.new_builtin_class_resolver=safer
### mybatis ### mybatis
mybatis.mapper-locations=classpath:/mybatis-mapper/*Mapper.xml mybatis.mapper-locations=classpath:/mybatis-mapper/*Mapper.xml
#mybatis.type-aliases-package=com.xxl.job.admin.core.model
### xxl-job, datasource
spring.datasource.url=jdbc:mysql://127.0.0.1:3306/xxl_job?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&serverTimezone=Asia/Shanghai
spring.datasource.username=root
spring.datasource.password=root_pwd
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
### datasource-pool ### datasource-pool
spring.datasource.type=com.zaxxer.hikari.HikariDataSource spring.datasource.type=com.zaxxer.hikari.HikariDataSource
@ -41,6 +34,12 @@ spring.datasource.hikari.connection-timeout=10000
spring.datasource.hikari.connection-test-query=SELECT 1 spring.datasource.hikari.connection-test-query=SELECT 1
spring.datasource.hikari.validation-timeout=1000 spring.datasource.hikari.validation-timeout=1000
### xxl-job, datasource
spring.datasource.url=jdbc:mysql://127.0.0.1:3306/xxl_job?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&serverTimezone=Asia/Shanghai
spring.datasource.username=root
spring.datasource.password=root_pwd
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
### xxl-job, email ### xxl-job, email
spring.mail.host=smtp.qq.com spring.mail.host=smtp.qq.com
spring.mail.port=25 spring.mail.port=25
@ -55,6 +54,9 @@ spring.mail.properties.mail.smtp.socketFactory.class=javax.net.ssl.SSLSocketFact
### xxl-job, access token ### xxl-job, access token
xxl.job.accessToken=default_token xxl.job.accessToken=default_token
### xxl-job, access token
xxl.job.timeout=3
### xxl-job, i18n (default is zh_CN, and you can choose "zh_CN", "zh_TC" and "en") ### xxl-job, i18n (default is zh_CN, and you can choose "zh_CN", "zh_TC" and "en")
xxl.job.i18n=zh_CN xxl.job.i18n=zh_CN

@ -24,11 +24,12 @@ public class AdminBizTest {
// admin-client // admin-client
private static String addressUrl = "http://127.0.0.1:8080/xxl-job-admin/"; private static String addressUrl = "http://127.0.0.1:8080/xxl-job-admin/";
private static String accessToken = null; private static String accessToken = null;
private static int timeoutSecond = 3;
@Test @Test
public void callback() throws Exception { public void callback() throws Exception {
AdminBiz adminBiz = new AdminBizClient(addressUrl, accessToken); AdminBiz adminBiz = new AdminBizClient(addressUrl, accessToken, timeoutSecond);
HandleCallbackParam param = new HandleCallbackParam(); HandleCallbackParam param = new HandleCallbackParam();
param.setLogId(1); param.setLogId(1);
@ -48,7 +49,7 @@ public class AdminBizTest {
*/ */
@Test @Test
public void registry() throws Exception { public void registry() throws Exception {
AdminBiz adminBiz = new AdminBizClient(addressUrl, accessToken); AdminBiz adminBiz = new AdminBizClient(addressUrl, accessToken, timeoutSecond);
RegistryParam registryParam = new RegistryParam(RegistryConfig.RegistType.EXECUTOR.name(), "xxl-job-executor-example", "127.0.0.1:9999"); RegistryParam registryParam = new RegistryParam(RegistryConfig.RegistType.EXECUTOR.name(), "xxl-job-executor-example", "127.0.0.1:9999");
ReturnT<String> returnT = adminBiz.registry(registryParam); ReturnT<String> returnT = adminBiz.registry(registryParam);
@ -63,7 +64,7 @@ public class AdminBizTest {
*/ */
@Test @Test
public void registryRemove() throws Exception { public void registryRemove() throws Exception {
AdminBiz adminBiz = new AdminBizClient(addressUrl, accessToken); AdminBiz adminBiz = new AdminBizClient(addressUrl, accessToken, timeoutSecond);
RegistryParam registryParam = new RegistryParam(RegistryConfig.RegistType.EXECUTOR.name(), "xxl-job-executor-example", "127.0.0.1:9999"); RegistryParam registryParam = new RegistryParam(RegistryConfig.RegistType.EXECUTOR.name(), "xxl-job-executor-example", "127.0.0.1:9999");
ReturnT<String> returnT = adminBiz.registryRemove(registryParam); ReturnT<String> returnT = adminBiz.registryRemove(registryParam);

@ -18,10 +18,11 @@ public class ExecutorBizTest {
// admin-client // admin-client
private static String addressUrl = "http://127.0.0.1:9999/"; private static String addressUrl = "http://127.0.0.1:9999/";
private static String accessToken = null; private static String accessToken = null;
private static int timeout = 3;
@Test @Test
public void beat() throws Exception { public void beat() throws Exception {
ExecutorBiz executorBiz = new ExecutorBizClient(addressUrl, accessToken); ExecutorBiz executorBiz = new ExecutorBizClient(addressUrl, accessToken, timeout);
// Act // Act
final ReturnT<String> retval = executorBiz.beat(); final ReturnT<String> retval = executorBiz.beat();
@ -34,7 +35,7 @@ public class ExecutorBizTest {
@Test @Test
public void idleBeat(){ public void idleBeat(){
ExecutorBiz executorBiz = new ExecutorBizClient(addressUrl, accessToken); ExecutorBiz executorBiz = new ExecutorBizClient(addressUrl, accessToken, timeout);
final int jobId = 0; final int jobId = 0;
@ -50,7 +51,7 @@ public class ExecutorBizTest {
@Test @Test
public void run(){ public void run(){
ExecutorBiz executorBiz = new ExecutorBizClient(addressUrl, accessToken); ExecutorBiz executorBiz = new ExecutorBizClient(addressUrl, accessToken, timeout);
// trigger data // trigger data
final TriggerParam triggerParam = new TriggerParam(); final TriggerParam triggerParam = new TriggerParam();
@ -73,7 +74,7 @@ public class ExecutorBizTest {
@Test @Test
public void kill(){ public void kill(){
ExecutorBiz executorBiz = new ExecutorBizClient(addressUrl, accessToken); ExecutorBiz executorBiz = new ExecutorBizClient(addressUrl, accessToken, timeout);
final int jobId = 0; final int jobId = 0;
@ -89,7 +90,7 @@ public class ExecutorBizTest {
@Test @Test
public void log(){ public void log(){
ExecutorBiz executorBiz = new ExecutorBizClient(addressUrl, accessToken); ExecutorBiz executorBiz = new ExecutorBizClient(addressUrl, accessToken, timeout);
final long logDateTim = 0L; final long logDateTim = 0L;
final long logId = 0; final long logId = 0;

@ -17,19 +17,23 @@ public class AdminBizClient implements AdminBiz {
public AdminBizClient() { public AdminBizClient() {
} }
public AdminBizClient(String addressUrl, String accessToken) { public AdminBizClient(String addressUrl, String accessToken, int timeout) {
this.addressUrl = addressUrl; this.addressUrl = addressUrl;
this.accessToken = accessToken; this.accessToken = accessToken;
this.timeout = timeout;
// valid // valid
if (!this.addressUrl.endsWith("/")) { if (!this.addressUrl.endsWith("/")) {
this.addressUrl = this.addressUrl + "/"; this.addressUrl = this.addressUrl + "/";
} }
if (!(this.timeout >=1 && this.timeout <= 10)) {
this.timeout = 3;
}
} }
private String addressUrl ; private String addressUrl ;
private String accessToken; private String accessToken;
private int timeout = 3; private int timeout;
@Override @Override

@ -13,19 +13,23 @@ public class ExecutorBizClient implements ExecutorBiz {
public ExecutorBizClient() { public ExecutorBizClient() {
} }
public ExecutorBizClient(String addressUrl, String accessToken) { public ExecutorBizClient(String addressUrl, String accessToken, int timeout) {
this.addressUrl = addressUrl; this.addressUrl = addressUrl;
this.accessToken = accessToken; this.accessToken = accessToken;
this.timeout = timeout;
// valid // valid
if (!this.addressUrl.endsWith("/")) { if (!this.addressUrl.endsWith("/")) {
this.addressUrl = this.addressUrl + "/"; this.addressUrl = this.addressUrl + "/";
} }
if (!(this.timeout >=1 && this.timeout <= 10)) {
this.timeout = 3;
}
} }
private String addressUrl ; private String addressUrl ;
private String accessToken; private String accessToken;
private int timeout = 3; private int timeout;
@Override @Override

@ -31,6 +31,7 @@ public class XxlJobExecutor {
// ---------------------- param ---------------------- // ---------------------- param ----------------------
private String adminAddresses; private String adminAddresses;
private String accessToken; private String accessToken;
private int timeout;
private String appname; private String appname;
private String address; private String address;
private String ip; private String ip;
@ -44,6 +45,9 @@ public class XxlJobExecutor {
public void setAccessToken(String accessToken) { public void setAccessToken(String accessToken) {
this.accessToken = accessToken; this.accessToken = accessToken;
} }
public void setTimeout(int timeout) {
this.timeout = timeout;
}
public void setAppname(String appname) { public void setAppname(String appname) {
this.appname = appname; this.appname = appname;
} }
@ -71,7 +75,7 @@ public class XxlJobExecutor {
XxlJobFileAppender.initLogPath(logPath); XxlJobFileAppender.initLogPath(logPath);
// init invoker, admin-client // init invoker, admin-client
initAdminBizList(adminAddresses, accessToken); initAdminBizList(adminAddresses, accessToken, timeout);
// init JobLogFileCleanThread // init JobLogFileCleanThread
@ -117,12 +121,12 @@ public class XxlJobExecutor {
// ---------------------- admin-client (rpc invoker) ---------------------- // ---------------------- admin-client (rpc invoker) ----------------------
private static List<AdminBiz> adminBizList; private static List<AdminBiz> adminBizList;
private void initAdminBizList(String adminAddresses, String accessToken) throws Exception { private void initAdminBizList(String adminAddresses, String accessToken, int timeout) throws Exception {
if (adminAddresses!=null && adminAddresses.trim().length()>0) { if (adminAddresses!=null && adminAddresses.trim().length()>0) {
for (String address: adminAddresses.trim().split(",")) { for (String address: adminAddresses.trim().split(",")) {
if (address!=null && address.trim().length()>0) { if (address!=null && address.trim().length()>0) {
AdminBiz adminBiz = new AdminBizClient(address.trim(), accessToken); AdminBiz adminBiz = new AdminBizClient(address.trim(), accessToken, timeout);
if (adminBizList == null) { if (adminBizList == null) {
adminBizList = new ArrayList<AdminBiz>(); adminBizList = new ArrayList<AdminBiz>();

@ -60,7 +60,7 @@ public class XxlJobRemotingUtil {
* *
* @param url * @param url
* @param accessToken * @param accessToken
* @param timeout * @param timeout by second
* @param requestObj * @param requestObj
* @param returnTargClassOfT * @param returnTargClassOfT
* @return * @return
@ -86,7 +86,7 @@ public class XxlJobRemotingUtil {
connection.setDoInput(true); connection.setDoInput(true);
connection.setUseCaches(false); connection.setUseCaches(false);
connection.setReadTimeout(timeout * 1000); connection.setReadTimeout(timeout * 1000);
connection.setConnectTimeout(3 * 1000); connection.setConnectTimeout(timeout * 1000);
connection.setRequestProperty("connection", "Keep-Alive"); connection.setRequestProperty("connection", "Keep-Alive");
connection.setRequestProperty("Content-Type", "application/json;charset=UTF-8"); connection.setRequestProperty("Content-Type", "application/json;charset=UTF-8");
connection.setRequestProperty("Accept-Charset", "application/json;charset=UTF-8"); connection.setRequestProperty("Accept-Charset", "application/json;charset=UTF-8");

@ -36,7 +36,8 @@ public class FrameLessXxlJobConfig {
// init executor // init executor
xxlJobExecutor = new XxlJobSimpleExecutor(); xxlJobExecutor = new XxlJobSimpleExecutor();
xxlJobExecutor.setAdminAddresses(xxlJobProp.getProperty("xxl.job.admin.addresses")); xxlJobExecutor.setAdminAddresses(xxlJobProp.getProperty("xxl.job.admin.addresses"));
xxlJobExecutor.setAccessToken(xxlJobProp.getProperty("xxl.job.accessToken")); xxlJobExecutor.setAccessToken(xxlJobProp.getProperty("xxl.job.admin.accessToken"));
xxlJobExecutor.setTimeout(Integer.valueOf(xxlJobProp.getProperty("xxl.job.admin.timeout")));
xxlJobExecutor.setAppname(xxlJobProp.getProperty("xxl.job.executor.appname")); xxlJobExecutor.setAppname(xxlJobProp.getProperty("xxl.job.executor.appname"));
xxlJobExecutor.setAddress(xxlJobProp.getProperty("xxl.job.executor.address")); xxlJobExecutor.setAddress(xxlJobProp.getProperty("xxl.job.executor.address"));
xxlJobExecutor.setIp(xxlJobProp.getProperty("xxl.job.executor.ip")); xxlJobExecutor.setIp(xxlJobProp.getProperty("xxl.job.executor.ip"));

@ -1,8 +1,9 @@
### xxl-job admin address list, such as "http://address" or "http://address01,http://address02" ### xxl-job admin address list, such as "http://address" or "http://address01,http://address02"
xxl.job.admin.addresses=http://127.0.0.1:8080/xxl-job-admin xxl.job.admin.addresses=http://127.0.0.1:8080/xxl-job-admin
### xxl-job access-token
### xxl-job, access token xxl.job.admin.accessToken=default_token
xxl.job.accessToken=default_token ### xxl-job timeout by second, default 3s
xxl.job.admin.timeout=3
### xxl-job executor appname ### xxl-job executor appname
xxl.job.executor.appname=xxl-job-executor-sample xxl.job.executor.appname=xxl-job-executor-sample

@ -19,9 +19,12 @@ public class XxlJobConfig {
@Value("${xxl.job.admin.addresses}") @Value("${xxl.job.admin.addresses}")
private String adminAddresses; private String adminAddresses;
@Value("${xxl.job.accessToken}") @Value("${xxl.job.admin.accessToken}")
private String accessToken; private String accessToken;
@Value("${xxl.job.admin.timeout}")
private int timeout;
@Value("${xxl.job.executor.appname}") @Value("${xxl.job.executor.appname}")
private String appname; private String appname;
@ -51,6 +54,7 @@ public class XxlJobConfig {
xxlJobSpringExecutor.setIp(ip); xxlJobSpringExecutor.setIp(ip);
xxlJobSpringExecutor.setPort(port); xxlJobSpringExecutor.setPort(port);
xxlJobSpringExecutor.setAccessToken(accessToken); xxlJobSpringExecutor.setAccessToken(accessToken);
xxlJobSpringExecutor.setTimeout(timeout);
xxlJobSpringExecutor.setLogPath(logPath); xxlJobSpringExecutor.setLogPath(logPath);
xxlJobSpringExecutor.setLogRetentionDays(logRetentionDays); xxlJobSpringExecutor.setLogRetentionDays(logRetentionDays);

@ -9,9 +9,10 @@ logging.config=classpath:logback.xml
### xxl-job admin address list, such as "http://address" or "http://address01,http://address02" ### xxl-job admin address list, such as "http://address" or "http://address01,http://address02"
xxl.job.admin.addresses=http://127.0.0.1:8080/xxl-job-admin xxl.job.admin.addresses=http://127.0.0.1:8080/xxl-job-admin
### xxl-job, access token ### xxl-job, access token
xxl.job.accessToken=default_token xxl.job.admin.accessToken=default_token
### xxl-job timeout by second, default 3s
xxl.job.admin.timeout=3
### xxl-job executor appname ### xxl-job executor appname
xxl.job.executor.appname=xxl-job-executor-sample xxl.job.executor.appname=xxl-job-executor-sample

Loading…
Cancel
Save