⬆️ Upgrading dependencies. close #I59RNF UP xxl-job 2.3.1

This commit is contained in:
Lht 2022-05-29 15:19:54 +08:00
parent 6591db8f30
commit b61badcf5f
14 changed files with 24 additions and 18 deletions

View File

@ -46,11 +46,16 @@ public class XxlJobAutoConfiguration {
if (!StringUtils.hasText(appName)) {
appName = environment.getProperty("spring.application.name");
}
String accessToken = environment.getProperty("xxl.job.accessToken");
if (!StringUtils.hasText(appName)) {
accessToken = executor.getAccessToken();
}
xxlJobSpringExecutor.setAppname(appName);
xxlJobSpringExecutor.setAddress(executor.getAddress());
xxlJobSpringExecutor.setIp(executor.getIp());
xxlJobSpringExecutor.setPort(executor.getPort());
xxlJobSpringExecutor.setAccessToken(executor.getAccessToken());
xxlJobSpringExecutor.setAccessToken(accessToken);
xxlJobSpringExecutor.setLogPath(executor.getLogPath());
xxlJobSpringExecutor.setLogRetentionDays(executor.getLogRetentionDays());

View File

@ -33,9 +33,9 @@ public class XxlExecutorProperties {
private Integer port = 9099;
/**
* 执行器通讯TOKEN [选填]非空时启用
* 执行器通讯TOKEN [必填]从配置文件中取不到值时使用默认值
*/
private String accessToken;
private String accessToken = "default_token";
/**
* 执行器运行日志文件存储磁盘路径 [选填] 需要对该路径拥有读写权限为空则使用默认路径

View File

@ -3,7 +3,7 @@ package com.xxl.job.admin.controller.interceptor;
import com.xxl.job.admin.core.util.FtlUtil;
import com.xxl.job.admin.core.util.I18nUtil;
import org.springframework.stereotype.Component;
import org.springframework.web.servlet.HandlerInterceptor;
import org.springframework.web.servlet.AsyncHandlerInterceptor;
import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.Cookie;
@ -17,7 +17,7 @@ import java.util.HashMap;
* @author xuxueli 2015-12-12 18:09:04
*/
@Component
public class CookieInterceptor implements HandlerInterceptor {
public class CookieInterceptor implements AsyncHandlerInterceptor {
@Override
public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,
@ -36,6 +36,7 @@ public class CookieInterceptor implements HandlerInterceptor {
if (modelAndView != null) {
modelAndView.addObject("I18nUtil", FtlUtil.generateStaticModel(I18nUtil.class.getName()));
}
}
}

View File

@ -6,7 +6,7 @@ import com.xxl.job.admin.core.util.I18nUtil;
import com.xxl.job.admin.service.LoginService;
import org.springframework.stereotype.Component;
import org.springframework.web.method.HandlerMethod;
import org.springframework.web.servlet.HandlerInterceptor;
import org.springframework.web.servlet.AsyncHandlerInterceptor;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
@ -19,7 +19,7 @@ import java.util.Arrays;
* @author xuxueli 2015-12-12 18:09:04
*/
@Component
public class PermissionInterceptor implements HandlerInterceptor {
public class PermissionInterceptor implements AsyncHandlerInterceptor {
/**
* 针对 spring boot admin 对外暴露的接口

View File

@ -26,4 +26,4 @@ public class WebMvcConfig implements WebMvcConfigurer {
registry.addInterceptor(cookieInterceptor).addPathPatterns("/**");
}
}
}

View File

@ -66,4 +66,4 @@ public class WebExceptionResolver implements HandlerExceptionResolver {
}
}
}
}

View File

@ -46,7 +46,7 @@ public class XxlJobCompleter {
// 1handle success, to trigger child job
String triggerChildMsg = null;
if (XxlJobContext.HANDLE_COCE_SUCCESS == xxlJobLog.getHandleCode()) {
if (XxlJobContext.HANDLE_CODE_SUCCESS == xxlJobLog.getHandleCode()) {
XxlJobInfo xxlJobInfo = XxlJobAdminConfig.getAdminConfig().getXxlJobInfoDao()
.loadById(xxlJobLog.getJobId());
if (xxlJobInfo != null && xxlJobInfo.getChildJobId() != null

View File

@ -51,10 +51,10 @@ public class XxlJobAdminConfig implements InitializingBean, DisposableBean {
@Value("${xxl.job.i18n}")
private String i18n;
@Value("${xxl.job.accessToken:}")
@Value("${xxl.job.accessToken}")
private String accessToken;
@Value("${spring.mail.from:}")
@Value("${spring.mail.from}")
private String emailFrom;
@Value("${xxl.job.triggerpool.fast.max}")

View File

@ -71,8 +71,7 @@ public class JobFailMonitorHelper {
// 2fail alarm monitor
int newAlarmStatus = 0; // 告警状态0-默认-1=锁定状态1-无需告警2-告警成功3-告警失败
if (info != null && info.getAlarmEmail() != null
&& info.getAlarmEmail().trim().length() > 0) {
if (info != null) {
boolean alarmResult = XxlJobAdminConfig.getAdminConfig().getJobAlarmer().alarm(info,
log);
newAlarmStatus = alarmResult ? 2 : 3;

View File

@ -8,6 +8,7 @@ server:
# xxl
xxl:
job:
accessToken: default_token
i18n: zh_CN
logretentiondays: 30
triggerpool:

View File

@ -1,6 +1,6 @@
admin_name=Scheduling Center
admin_name_full=Distributed Task Scheduling Platform XXL-JOB
admin_version=2.3.0
admin_version=2.3.1
admin_i18n=en
## system

View File

@ -1,6 +1,6 @@
admin_name=任务调度中心
admin_name_full=分布式任务调度平台XXL-JOB
admin_version=2.3.0
admin_version=2.3.1
admin_i18n=
## system

View File

@ -1,6 +1,6 @@
admin_name=任務調度中心
admin_name_full=分布式任務調度平臺XXL-JOB
admin_version=2.3.0
admin_version=2.3.1
admin_i18n=
## system

View File

@ -42,7 +42,7 @@
<configuration.version>1.10</configuration.version>
<jasypt.version>2.1.0</jasypt.version>
<swagger.fox.version>3.0.0</swagger.fox.version>
<xxl-job.version>2.3.0</xxl-job.version>
<xxl-job.version>2.3.1</xxl-job.version>
<docker.plugin.version>0.32.0</docker.plugin.version>
<docker.host>http://192.168.0.100:2375</docker.host>
<docker.registry>192.168.0.100</docker.registry>