You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streampark.apache.org by be...@apache.org on 2022/11/28 15:42:39 UTC
[incubator-streampark] branch dev updated: Fix the problem that mybatis plus sets jdbcTypeForNull to null (#2106)
This is an automated email from the ASF dual-hosted git repository.
benjobs pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-streampark.git
The following commit(s) were added to refs/heads/dev by this push:
new 7104c7c75 Fix the problem that mybatis plus sets jdbcTypeForNull to null (#2106)
7104c7c75 is described below
commit 7104c7c759c83141bb8abafafb83d6c72b0c5e49
Author: avatarTaier <11...@users.noreply.github.com>
AuthorDate: Mon Nov 28 23:42:34 2022 +0800
Fix the problem that mybatis plus sets jdbcTypeForNull to null (#2106)
* Fix the problem that mybatis plus sets jdbcTypeForNull to null
---
.../java/org/apache/streampark/console/base/config/MybatisConfig.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/base/config/MybatisConfig.java b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/base/config/MybatisConfig.java
index 36244be3a..df94e50a7 100644
--- a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/base/config/MybatisConfig.java
+++ b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/base/config/MybatisConfig.java
@@ -27,6 +27,7 @@ import com.baomidou.mybatisplus.core.config.GlobalConfig;
import com.baomidou.mybatisplus.core.toolkit.GlobalConfigUtils;
import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
+import org.apache.ibatis.type.JdbcType;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Bean;
@@ -79,7 +80,7 @@ public class MybatisConfig {
properties.setTypeAliasesPackage("org.apache.streampark.console.*.entity");
properties.setMapperLocations(new String[]{"classpath:mapper/*/*.xml"});
MybatisConfiguration mybatisConfiguration = new MybatisConfiguration();
- mybatisConfiguration.setJdbcTypeForNull(null);
+ mybatisConfiguration.setJdbcTypeForNull(JdbcType.NULL);
properties.setConfiguration(mybatisConfiguration);
GlobalConfig globalConfig = GlobalConfigUtils.getGlobalConfig(mybatisConfiguration);
GlobalConfig.DbConfig dbConfig = globalConfig.getDbConfig();