diff --git a/pom.xml b/pom.xml
index e8b9c2932..c58c9a4e1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -27,7 +27,6 @@
3.5.7
3.9.1
5.8.31
- 4.10.0
3.2.3
3.34.1
2.2.7
@@ -230,12 +229,6 @@
${p6spy.version}
-
- com.squareup.okhttp3
- okhttp
- ${okhttp.version}
-
-
software.amazon.awssdk
diff --git a/ruoyi-admin/src/main/resources/application.yml b/ruoyi-admin/src/main/resources/application.yml
index a101e9523..60c1873d9 100644
--- a/ruoyi-admin/src/main/resources/application.yml
+++ b/ruoyi-admin/src/main/resources/application.yml
@@ -223,9 +223,10 @@ xss:
# 过滤开关
enabled: true
# 排除链接(多个用逗号分隔)
- excludes: /system/notice
- # 匹配链接
- urlPatterns: /system/*,/monitor/*,/tool/*
+ excludeUrls:
+ - /system/notice
+ - /workflow/model/save
+ - /workflow/model/editModelXml
# 全局线程池相关配置
# 如使用JDK21请直接使用虚拟线程 不要开启此配置
diff --git a/ruoyi-common/ruoyi-common-tenant/src/main/java/org/dromara/common/tenant/helper/TenantHelper.java b/ruoyi-common/ruoyi-common-tenant/src/main/java/org/dromara/common/tenant/helper/TenantHelper.java
index b18561267..1a5ea1a76 100644
--- a/ruoyi-common/ruoyi-common-tenant/src/main/java/org/dromara/common/tenant/helper/TenantHelper.java
+++ b/ruoyi-common/ruoyi-common-tenant/src/main/java/org/dromara/common/tenant/helper/TenantHelper.java
@@ -1,6 +1,5 @@
package org.dromara.common.tenant.helper;
-import cn.dev33.satoken.stp.StpUtil;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.convert.Convert;
import cn.hutool.core.util.ObjectUtil;
@@ -130,7 +129,7 @@ public class TenantHelper {
if (!isEnable()) {
return;
}
- if (!isLogin() || !global) {
+ if (!LoginHelper.isLogin() || !global) {
TEMP_DYNAMIC_TENANT.set(tenantId);
return;
}
@@ -147,7 +146,7 @@ public class TenantHelper {
if (!isEnable()) {
return null;
}
- if (!isLogin()) {
+ if (!LoginHelper.isLogin()) {
return TEMP_DYNAMIC_TENANT.get();
}
// 如果线程内有值 优先返回
@@ -167,7 +166,7 @@ public class TenantHelper {
if (!isEnable()) {
return;
}
- if (!isLogin()) {
+ if (!LoginHelper.isLogin()) {
TEMP_DYNAMIC_TENANT.remove();
return;
}
@@ -218,13 +217,4 @@ public class TenantHelper {
return tenantId;
}
- private static boolean isLogin() {
- try {
- StpUtil.checkLogin();
- return true;
- } catch (Exception e) {
- return false;
- }
- }
-
}
diff --git a/ruoyi-common/ruoyi-common-web/src/main/java/org/dromara/common/web/config/FilterConfig.java b/ruoyi-common/ruoyi-common-web/src/main/java/org/dromara/common/web/config/FilterConfig.java
index 91fff76b6..bc27d6f3e 100644
--- a/ruoyi-common/ruoyi-common-web/src/main/java/org/dromara/common/web/config/FilterConfig.java
+++ b/ruoyi-common/ruoyi-common-web/src/main/java/org/dromara/common/web/config/FilterConfig.java
@@ -1,19 +1,15 @@
package org.dromara.common.web.config;
-import org.dromara.common.core.utils.StringUtils;
+import jakarta.servlet.DispatcherType;
import org.dromara.common.web.config.properties.XssProperties;
import org.dromara.common.web.filter.RepeatableFilter;
import org.dromara.common.web.filter.XssFilter;
-import jakarta.servlet.DispatcherType;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
-import java.util.HashMap;
-import java.util.Map;
-
/**
* Filter配置
*
@@ -30,12 +26,9 @@ public class FilterConfig {
FilterRegistrationBean registration = new FilterRegistrationBean();
registration.setDispatcherTypes(DispatcherType.REQUEST);
registration.setFilter(new XssFilter());
- registration.addUrlPatterns(StringUtils.split(xssProperties.getUrlPatterns(), StringUtils.SEPARATOR));
+ registration.addUrlPatterns("/*");
registration.setName("xssFilter");
registration.setOrder(FilterRegistrationBean.HIGHEST_PRECEDENCE);
- Map initParameters = new HashMap<>();
- initParameters.put("excludes", xssProperties.getExcludes());
- registration.setInitParameters(initParameters);
return registration;
}
diff --git a/ruoyi-common/ruoyi-common-web/src/main/java/org/dromara/common/web/config/properties/XssProperties.java b/ruoyi-common/ruoyi-common-web/src/main/java/org/dromara/common/web/config/properties/XssProperties.java
index ecf4f33dc..bd3e59b17 100644
--- a/ruoyi-common/ruoyi-common-web/src/main/java/org/dromara/common/web/config/properties/XssProperties.java
+++ b/ruoyi-common/ruoyi-common-web/src/main/java/org/dromara/common/web/config/properties/XssProperties.java
@@ -3,6 +3,9 @@ package org.dromara.common.web.config.properties;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
+import java.util.ArrayList;
+import java.util.List;
+
/**
* xss过滤 配置属性
*
@@ -13,18 +16,13 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
public class XssProperties {
/**
- * 过滤开关
+ * Xss开关
*/
- private String enabled;
+ private Boolean enabled;
/**
- * 排除链接(多个用逗号分隔)
+ * 排除路径
*/
- private String excludes;
-
- /**
- * 匹配链接
- */
- private String urlPatterns;
+ private List excludeUrls = new ArrayList<>();
}
diff --git a/ruoyi-common/ruoyi-common-web/src/main/java/org/dromara/common/web/filter/XssFilter.java b/ruoyi-common/ruoyi-common-web/src/main/java/org/dromara/common/web/filter/XssFilter.java
index a6cbe8c58..95bcdd99a 100644
--- a/ruoyi-common/ruoyi-common-web/src/main/java/org/dromara/common/web/filter/XssFilter.java
+++ b/ruoyi-common/ruoyi-common-web/src/main/java/org/dromara/common/web/filter/XssFilter.java
@@ -1,6 +1,8 @@
package org.dromara.common.web.filter;
+import org.dromara.common.core.utils.SpringUtils;
import org.dromara.common.core.utils.StringUtils;
+import org.dromara.common.web.config.properties.XssProperties;
import org.springframework.http.HttpMethod;
import jakarta.servlet.*;
@@ -23,13 +25,8 @@ public class XssFilter implements Filter {
@Override
public void init(FilterConfig filterConfig) throws ServletException {
- String tempExcludes = filterConfig.getInitParameter("excludes");
- if (StringUtils.isNotEmpty(tempExcludes)) {
- String[] url = tempExcludes.split(StringUtils.SEPARATOR);
- for (int i = 0; url != null && i < url.length; i++) {
- excludes.add(url[i]);
- }
- }
+ XssProperties properties = SpringUtils.getBean(XssProperties.class);
+ excludes.addAll(properties.getExcludeUrls());
}
@Override
diff --git a/ruoyi-extend/ruoyi-snailjob-server/pom.xml b/ruoyi-extend/ruoyi-snailjob-server/pom.xml
index 7348b29e7..0b3afd325 100644
--- a/ruoyi-extend/ruoyi-snailjob-server/pom.xml
+++ b/ruoyi-extend/ruoyi-snailjob-server/pom.xml
@@ -16,6 +16,18 @@
com.aizuda
snail-job-server-starter
${snailjob.version}
+
+
+ org.scala-lang
+ scala-library
+
+
+
+
+
+ org.scala-lang
+ scala-library
+ 2.13.9
diff --git a/ruoyi-modules/ruoyi-generator/src/main/java/org/dromara/generator/mapper/GenTableMapper.java b/ruoyi-modules/ruoyi-generator/src/main/java/org/dromara/generator/mapper/GenTableMapper.java
index 63f4c1512..1798b4b60 100644
--- a/ruoyi-modules/ruoyi-generator/src/main/java/org/dromara/generator/mapper/GenTableMapper.java
+++ b/ruoyi-modules/ruoyi-generator/src/main/java/org/dromara/generator/mapper/GenTableMapper.java
@@ -2,10 +2,8 @@ package org.dromara.generator.mapper;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
import org.dromara.generator.domain.GenTable;
-import org.apache.ibatis.annotations.Param;
import java.util.List;
@@ -40,6 +38,14 @@ public interface GenTableMapper extends BaseMapperPlus {
*/
GenTable selectGenTableByName(String tableName);
+ /**
+ * 查询指定数据源下的所有表名列表
+ *
+ * @param dataName 数据源名称,用于选择不同的数据源
+ * @return 当前数据库中的表名列表
+ *
+ * @DS("") 使用默认数据源执行查询操作
+ */
@DS("")
List selectTableNameList(String dataName);
}
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/listener/SysUserImportListener.java b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/listener/SysUserImportListener.java
index 1ea8f2dad..25b62a9d9 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/listener/SysUserImportListener.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/listener/SysUserImportListener.java
@@ -3,6 +3,7 @@ package org.dromara.system.listener;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.crypto.digest.BCrypt;
+import cn.hutool.http.HtmlUtil;
import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.event.AnalysisEventListener;
import jakarta.validation.ConstraintViolation;
@@ -82,7 +83,7 @@ public class SysUserImportListener extends AnalysisEventListener