From 53c1db0bdc4e9598202e0343c8f99d12ed043c77 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=94=90=E4=BA=9A=E5=B3=B0=20=7C=20battcn?=
<1837307557@qq.com>
Date: Mon, 9 Feb 2026 11:29:06 +0800
Subject: [PATCH 1/4] =?UTF-8?q?[feat]=20SpringBoot4=20=E9=80=82=E9=85=8D?=
=?UTF-8?q?=20-=20IDN609?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../pom.xml | 91 +++++++++++++++++++
1 file changed, 91 insertions(+)
create mode 100644 warm-flow-orm/warm-flow-mybatis-plus/warm-flow-mybatis-plus-sb4-starter/pom.xml
diff --git a/warm-flow-orm/warm-flow-mybatis-plus/warm-flow-mybatis-plus-sb4-starter/pom.xml b/warm-flow-orm/warm-flow-mybatis-plus/warm-flow-mybatis-plus-sb4-starter/pom.xml
new file mode 100644
index 00000000..28aa0c70
--- /dev/null
+++ b/warm-flow-orm/warm-flow-mybatis-plus/warm-flow-mybatis-plus-sb4-starter/pom.xml
@@ -0,0 +1,91 @@
+
+
+ 4.0.0
+
+ org.dromara.warm
+ warm-flow-mybatis-plus
+ 1.8.5-m1
+
+
+ warm-flow-mybatis-plus-sb4-starter
+ warm-flow-mybatis-plus-sb4-starter
+ warm-flow orm为mybatis-plus的springboot4 starter
+ https://github.com/dromara/warm-flow
+
+
+ 3.5.15
+
+
+
+
+ org.dromara.warm
+ warm-flow-mybatis-plus-sb-starter
+
+
+ mybatis-plus-extension
+ com.baomidou
+
+
+ com.baomidou
+ mybatis-plus-boot-starter
+
+
+
+
+
+ com.baomidou
+ mybatis-plus-spring-boot4-starter
+ ${mybatis-plus.version}
+
+
+
+ com.baomidou
+ mybatis-plus-jsqlparser
+ ${mybatis-plus.version}
+
+
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-dependencies
+ ${springboot4.version}
+ pom
+ import
+
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ 3.8.1
+
+ ${java17.version}
+ ${java17.version}
+ true
+ ${java17.path}\javac
+ ${project.build.sourceEncoding}
+
+
+
+ org.apache.maven.plugins
+ maven-jar-plugin
+ 3.2.0
+
+
+
+ ${java17.version}
+
+
+
+
+
+
+
--
Gitee
From ff052d31a3f226ec5c788da470a6bad02f89386c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=94=90=E4=BA=9A=E5=B3=B0=20=7C=20battcn?=
<1837307557@qq.com>
Date: Mon, 9 Feb 2026 11:29:16 +0800
Subject: [PATCH 2/4] =?UTF-8?q?[feat]=20SpringBoot4=20=E9=80=82=E9=85=8D?=
=?UTF-8?q?=20-=20IDN609?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
warm-flow-orm/warm-flow-mybatis-plus/pom.xml | 1 +
1 file changed, 1 insertion(+)
diff --git a/warm-flow-orm/warm-flow-mybatis-plus/pom.xml b/warm-flow-orm/warm-flow-mybatis-plus/pom.xml
index 25179c27..1fdee676 100644
--- a/warm-flow-orm/warm-flow-mybatis-plus/pom.xml
+++ b/warm-flow-orm/warm-flow-mybatis-plus/pom.xml
@@ -18,6 +18,7 @@
warm-flow-mybatis-plus-core
warm-flow-mybatis-plus-sb-starter
warm-flow-mybatis-plus-sb3-starter
+ warm-flow-mybatis-plus-sb4-starter
warm-flow-mybatis-plus-solon-plugin
--
Gitee
From 48284f1a82418a67e2190a4138bda044b32a7399 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=94=90=E4=BA=9A=E5=B3=B0=20=7C=20battcn?=
<1837307557@qq.com>
Date: Mon, 9 Feb 2026 11:29:22 +0800
Subject: [PATCH 3/4] =?UTF-8?q?[feat]=20SpringBoot4=20=E9=80=82=E9=85=8D?=
=?UTF-8?q?=20-=20IDN609?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pom.xml | 1 +
1 file changed, 1 insertion(+)
diff --git a/pom.xml b/pom.xml
index c5b963b3..191e8fd4 100644
--- a/pom.xml
+++ b/pom.xml
@@ -75,6 +75,7 @@
2.7.18
3.0.1
+ 4.0.2
3.0.2
8.0.33
--
Gitee
From bc7ab21f1eb56608a5e7c9093539bce9817586a6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=94=90=E4=BA=9A=E5=B3=B0=20=7C=20battcn?=
<1837307557@qq.com>
Date: Mon, 9 Feb 2026 11:29:35 +0800
Subject: [PATCH 4/4] =?UTF-8?q?[feat]=20=E4=BC=98=E5=8C=96=E4=BB=A3?=
=?UTF-8?q?=E7=A0=81=E6=B3=A8=E9=87=8A=E5=92=8C=E9=9D=99=E6=80=81=E5=B1=9E?=
=?UTF-8?q?=E6=80=A7?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../warm/flow/orm/utils/CommonUtil.java | 19 +++++++++----------
.../plugin/modes/sb/helper/SpelHelper.java | 17 +++++++++--------
.../plugin/modes/sb/utils/SpringUtil.java | 7 ++++---
3 files changed, 22 insertions(+), 21 deletions(-)
diff --git a/warm-flow-orm/warm-flow-mybatis/warm-flow-mybatis-core/src/main/java/org/dromara/warm/flow/orm/utils/CommonUtil.java b/warm-flow-orm/warm-flow-mybatis/warm-flow-mybatis-core/src/main/java/org/dromara/warm/flow/orm/utils/CommonUtil.java
index 0191d5cb..fe0c2c82 100644
--- a/warm-flow-orm/warm-flow-mybatis/warm-flow-mybatis-core/src/main/java/org/dromara/warm/flow/orm/utils/CommonUtil.java
+++ b/warm-flow-orm/warm-flow-mybatis/warm-flow-mybatis-core/src/main/java/org/dromara/warm/flow/orm/utils/CommonUtil.java
@@ -23,6 +23,9 @@ import javax.sql.DataSource;
import java.sql.Connection;
import java.sql.DatabaseMetaData;
+/**
+ * @author 笨小孩
+ */
public class CommonUtil {
private CommonUtil() {
@@ -34,21 +37,17 @@ public class CommonUtil {
if (StringUtils.isEmpty(dataSourceType)) {
DataSource dataSource = configuration.getEnvironment().getDataSource();
DatabaseMetaData metaData;
- Connection connection = null;
- try {
- connection = dataSource.getConnection();
- metaData = connection.getMetaData();
- dataSourceType = metaData.getDatabaseProductName().toLowerCase();
- } catch (Exception e) {
- // 不能因为一个字段的取值, 影响到框架自身运行环境
- // throw new RuntimeException(e);
- } finally {
+ try (Connection connection = dataSource.getConnection()) {
try {
- connection.close();
+ metaData = connection.getMetaData();
+ dataSourceType = metaData.getDatabaseProductName().toLowerCase();
} catch (Exception e) {
// 不能因为一个字段的取值, 影响到框架自身运行环境
// throw new RuntimeException(e);
}
+ } catch (Exception e) {
+ // 不能因为一个字段的取值, 影响到框架自身运行环境
+ // throw new RuntimeException(e);
}
}
diff --git a/warm-flow-plugin/warm-flow-plugin-modes/warm-flow-plugin-modes-sb/src/main/java/org/dromara/warm/plugin/modes/sb/helper/SpelHelper.java b/warm-flow-plugin/warm-flow-plugin-modes/warm-flow-plugin-modes-sb/src/main/java/org/dromara/warm/plugin/modes/sb/helper/SpelHelper.java
index f2ce011e..31c57de6 100644
--- a/warm-flow-plugin/warm-flow-plugin-modes/warm-flow-plugin-modes-sb/src/main/java/org/dromara/warm/plugin/modes/sb/helper/SpelHelper.java
+++ b/warm-flow-plugin/warm-flow-plugin-modes/warm-flow-plugin-modes-sb/src/main/java/org/dromara/warm/plugin/modes/sb/helper/SpelHelper.java
@@ -28,19 +28,20 @@ import org.springframework.expression.ParserContext;
import org.springframework.expression.common.TemplateParserContext;
import org.springframework.expression.spel.standard.SpelExpressionParser;
import org.springframework.expression.spel.support.StandardEvaluationContext;
+import org.springframework.lang.NonNull;
import java.util.Map;
/**
- * 条件表达式spel
+ * 条件表达式 spel
*
- * @author warm
+ * @author warm,battcn
*/
@Configuration
public class SpelHelper implements ApplicationContextAware {
- private static final ExpressionParser parser = new SpelExpressionParser();
- private final static ParserContext parserContext = new TemplateParserContext();
+ private static final ExpressionParser PARSER = new SpelExpressionParser();
+ private final static ParserContext PARSER_CONTEXT = new TemplateParserContext();
private static ApplicationContext applicationContext;
@@ -57,18 +58,18 @@ public class SpelHelper implements ApplicationContextAware {
}
/**
- * @param expression
- * @return
+ * @param expression expression
+ * @return Object
*/
public static Object parseExpression(String expression, Map variable) {
StandardEvaluationContext context = new StandardEvaluationContext();
context.setBeanResolver(beanResolver());
context.setVariables(variable);
- return parser.parseExpression(expression, parserContext).getValue(context, Object.class);
+ return PARSER.parseExpression(expression, PARSER_CONTEXT).getValue(context, Object.class);
}
@Override
- public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
+ public void setApplicationContext(@NonNull ApplicationContext applicationContext) throws BeansException {
if (SpelHelper.applicationContext == null) {
SpelHelper.applicationContext = applicationContext;
}
diff --git a/warm-flow-plugin/warm-flow-plugin-modes/warm-flow-plugin-modes-sb/src/main/java/org/dromara/warm/plugin/modes/sb/utils/SpringUtil.java b/warm-flow-plugin/warm-flow-plugin-modes/warm-flow-plugin-modes-sb/src/main/java/org/dromara/warm/plugin/modes/sb/utils/SpringUtil.java
index 8450c912..5073d61d 100644
--- a/warm-flow-plugin/warm-flow-plugin-modes/warm-flow-plugin-modes-sb/src/main/java/org/dromara/warm/plugin/modes/sb/utils/SpringUtil.java
+++ b/warm-flow-plugin/warm-flow-plugin-modes/warm-flow-plugin-modes-sb/src/main/java/org/dromara/warm/plugin/modes/sb/utils/SpringUtil.java
@@ -18,6 +18,7 @@ package org.dromara.warm.plugin.modes.sb.utils;
import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
+import org.springframework.lang.NonNull;
import org.springframework.stereotype.Component;
/**
@@ -31,21 +32,21 @@ public class SpringUtil implements ApplicationContextAware {
/**
* 获取applicationContext,应用上下文
*
- * @return
+ * @return ApplicationContext
*/
public static ApplicationContext getApplicationContext() {
return applicationContext;
}
@Override
- public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
+ public void setApplicationContext(@NonNull ApplicationContext applicationContext) throws BeansException {
if (SpringUtil.applicationContext == null) {
SpringUtil.applicationContext = applicationContext;
}
}
/**
- * 通过class获取Bean
+ * 通过 class 获取 Bean
*/
public static M getBean(Class clazz) {
return getApplicationContext().getBean(clazz);
--
Gitee