From 8ec0be01a8a5356e4fd04ab7d36e5c20fdde70ec Mon Sep 17 00:00:00 2001 From: LiuZijian Date: Tue, 9 May 2023 14:03:45 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=EF=BC=9A=E8=BE=BE=E6=A2=A6?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=BA=93=E9=A9=B1=E5=8A=A8=EF=BC=8CKeyGenera?= =?UTF-8?q?tor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yudao-dependencies/pom.xml | 8 ++++++++ yudao-framework/yudao-spring-boot-starter-mybatis/pom.xml | 5 ++++- .../mybatis/config/YudaoMybatisAutoConfiguration.java | 7 +++---- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/yudao-dependencies/pom.xml b/yudao-dependencies/pom.xml index abfc23e06..a13cf8c7f 100644 --- a/yudao-dependencies/pom.xml +++ b/yudao-dependencies/pom.xml @@ -28,6 +28,7 @@ 3.6.1 1.4.3.2 3.18.0 + 8.1.2.141 2.2.3 1.7.1 @@ -228,6 +229,13 @@ ${redisson.version} + + com.dameng + DmJdbcDriver18 + ${dm8.jdbc.version} + + + cn.iocoder.boot diff --git a/yudao-framework/yudao-spring-boot-starter-mybatis/pom.xml b/yudao-framework/yudao-spring-boot-starter-mybatis/pom.xml index 4424c72b6..14a7eaf30 100644 --- a/yudao-framework/yudao-spring-boot-starter-mybatis/pom.xml +++ b/yudao-framework/yudao-spring-boot-starter-mybatis/pom.xml @@ -45,7 +45,10 @@ com.microsoft.sqlserver mssql-jdbc - + + com.dameng + DmJdbcDriver18 + com.alibaba druid-spring-boot-starter diff --git a/yudao-framework/yudao-spring-boot-starter-mybatis/src/main/java/cn/iocoder/yudao/framework/mybatis/config/YudaoMybatisAutoConfiguration.java b/yudao-framework/yudao-spring-boot-starter-mybatis/src/main/java/cn/iocoder/yudao/framework/mybatis/config/YudaoMybatisAutoConfiguration.java index 78ee259c8..d5ea3069a 100644 --- a/yudao-framework/yudao-spring-boot-starter-mybatis/src/main/java/cn/iocoder/yudao/framework/mybatis/config/YudaoMybatisAutoConfiguration.java +++ b/yudao-framework/yudao-spring-boot-starter-mybatis/src/main/java/cn/iocoder/yudao/framework/mybatis/config/YudaoMybatisAutoConfiguration.java @@ -5,10 +5,7 @@ import cn.iocoder.yudao.framework.mybatis.core.handler.DefaultDBFieldHandler; import com.baomidou.mybatisplus.annotation.DbType; import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler; import com.baomidou.mybatisplus.core.incrementer.IKeyGenerator; -import com.baomidou.mybatisplus.extension.incrementer.H2KeyGenerator; -import com.baomidou.mybatisplus.extension.incrementer.KingbaseKeyGenerator; -import com.baomidou.mybatisplus.extension.incrementer.OracleKeyGenerator; -import com.baomidou.mybatisplus.extension.incrementer.PostgreKeyGenerator; +import com.baomidou.mybatisplus.extension.incrementer.*; import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor; import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor; import org.apache.ibatis.annotations.Mapper; @@ -55,6 +52,8 @@ public class YudaoMybatisAutoConfiguration { return new H2KeyGenerator(); case KINGBASE_ES: return new KingbaseKeyGenerator(); + case DM: + return new DmKeyGenerator(); } } // 找不到合适的 IKeyGenerator 实现类