docs(job): 更新官方文档并优化前端错误页面逻辑

- 修改文档中关于API响应结构调整的说明,明确指出openapi交互需要注意字段变更
- 在错误页面模板中引入公共宏定义,并增加对Tab页打开情况的判断隐藏返回按钮
- 增加JavaScript工具函数isOpenWithTab用于检测当前是否在Tab中打开页面
- 更新无框架执行器配置类中的属性加载方式,使用PropTool工具类替换自定义实现
- 优化权限工具类中对登录信息额外数据的空值判断逻辑,增强代码健壮性
- 补充版本升级备注说明,包括数据模型兼容性和客户端依赖更新建议
3.3.0-release
xuxueli 3 weeks ago
parent 198fb4270a
commit 5955263ce5

@ -2619,7 +2619,7 @@ public void execute() {
- 7、【优化】任务回调失败日志读写磁盘逻辑优化解决极端情况下大文件读写内存问题
- 8、【升级】Http通讯组件升级基于接口代理方式重构通讯组件提升组件性能及扩展性
- 9、【重构】规范API交互协议通用响应结构体调整为Response调度中心API统一为Response封装数据
注意响应结构体从ReturnT升级为Response其中属性值“content”会调整为“data”取值逻辑需注意)
(注意:a响应结构体从ReturnT升级为Response其中属性值“content”会调整为“data”通过openapi交互场景需要关注
- 10、【重构】调度过期策略、调度类型策略逻辑重构代码组件化拆分并完善日志提升健壮性及可维护性
- 11、【重构】调度中心底层组件重构组件初始化以及销毁逻辑统一处理任务触发及和回调逻辑优化避免资源泄漏风险
- 12、【重构】调度中心底层组件模块化拆分移除组件单例以及静态代码逻辑提升组件可维护性
@ -2657,6 +2657,9 @@ public void execute() {
- 19、【优化】调度组件日志完善提升边界情况下问题定位效率
- 20、【升级】升级多项maven依赖至较新版本如 netty、groovy、springboot、spring-ai、dify、mybatis、xxl-sso 等;
**备注:**
a、本次升级数据模型向前兼容v3.2.*版本可直接升级不需要进行数据调整;
b、本次升级针对客户端rollinglog依赖字段做规范约束如不关注改功能 v2.4.* 及后续版本客户端可忽略,否则需要一并升级客户端版本;
### TODO LIST
- 1、调度隔离调度中心针对不同执行器各自维护不同的调度和远程触发组件。

@ -51,7 +51,9 @@ public class JobGroupPermissionUtil {
if (XxlSsoHelper.hasRole(loginInfoResponse.getData(), Consts.ADMIN_ROLE).isSuccess()) {
return jobGroupListTotal;
} else {
List<String> jobGroups = (loginInfoResponse.getData().getExtraInfo()!=null && loginInfoResponse.getData().getExtraInfo().containsKey("jobGroups"))
List<String> jobGroups = (loginInfoResponse.getData().getExtraInfo()!=null
&& loginInfoResponse.getData().getExtraInfo().get("jobGroups")!=null
)
? StringTool.split(loginInfoResponse.getData().getExtraInfo().get("jobGroups"), ",")
:new ArrayList<>();

@ -34,5 +34,14 @@ $(function(){
}
}
}
// ---------------------- isOpenWithTab ----------------------
/**
* Tab
*/
window.isOpenWithTab = function () {
return !!window.parent.$.adminTab;
}
});

@ -1,6 +1,9 @@
<!DOCTYPE html>
<html>
<head>
<#-- import macro -->
<#import "../common/common.macro.ftl" as netCommon>
<meta charset="UTF-8">
<title>Error</title>
<style type="text/css">
@ -23,9 +26,21 @@
<div class="dialog">
<h1>System Error</h1>
<p><#if exceptionMsg?exists>${exceptionMsg}<#else>Unknown Error.</#if></p>
<a href="javascript:window.location.href='${request.contextPath}/'">Back</a>
<a href="javascript:window.location.href='${request.contextPath}/'" id="go_back" >Back</a>
</p>
</div>
<!-- 3-script start -->
<script src="${request.contextPath}/static/adminlte/bower_components/jquery/jquery.min.js"></script>
<script src="${request.contextPath}/static/biz/common/admin.util.js"></script>
<script>
$(function() {
if (isOpenWithTab()) {
$('#go_back').hide();
}
});
</script>
<!-- 3-script end -->
</body>
</html>

@ -2,11 +2,10 @@ package com.xxl.job.executor.sample.frameless.config;
import com.xxl.job.executor.sample.frameless.jobhandler.SampleXxlJob;
import com.xxl.job.core.executor.impl.XxlJobSimpleExecutor;
import com.xxl.tool.core.PropTool;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.Properties;
@ -14,10 +13,10 @@ import java.util.Properties;
* @author xuxueli 2018-10-31 19:05:43
*/
public class FrameLessXxlJobConfig {
private static Logger logger = LoggerFactory.getLogger(FrameLessXxlJobConfig.class);
private static final Logger logger = LoggerFactory.getLogger(FrameLessXxlJobConfig.class);
private static FrameLessXxlJobConfig instance = new FrameLessXxlJobConfig();
private static final FrameLessXxlJobConfig instance = new FrameLessXxlJobConfig();
public static FrameLessXxlJobConfig getInstance() {
return instance;
}
@ -31,7 +30,7 @@ public class FrameLessXxlJobConfig {
public void initXxlJobExecutor() {
// load executor prop
Properties xxlJobProp = loadProperties("xxl-job-executor.properties");
Properties xxlJobProp = PropTool.loadProp("xxl-job-executor.properties");
// init executor
xxlJobExecutor = new XxlJobSimpleExecutor();
@ -65,30 +64,4 @@ public class FrameLessXxlJobConfig {
}
}
public static Properties loadProperties(String propertyFileName) {
InputStreamReader in = null;
try {
ClassLoader loder = Thread.currentThread().getContextClassLoader();
in = new InputStreamReader(loder.getResourceAsStream(propertyFileName), "UTF-8");;
if (in != null) {
Properties prop = new Properties();
prop.load(in);
return prop;
}
} catch (IOException e) {
logger.error("load {} error!", propertyFileName);
} finally {
if (in != null) {
try {
in.close();
} catch (IOException e) {
logger.error("close {} error!", propertyFileName);
}
}
}
return null;
}
}

Loading…
Cancel
Save