From a6baca92a202e10c559e3982a59b3451ec0be9c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=80=E6=BA=90=E6=B5=B7=E5=93=A5?= Date: Thu, 22 Jun 2023 12:35:47 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=BB=E9=99=A4=20db-type=20=E7=9A=84?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=EF=BC=8C=E8=BF=99=E4=B8=AA=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E4=B8=BA=20flex=20=E8=87=AA=E5=8A=A8=E8=AF=BB=E5=8F=96?= =?UTF-8?q?=E7=9A=84=E6=95=B0=E6=8D=AE=E6=BA=90=E5=88=86=E6=9E=90=E5=87=BA?= =?UTF-8?q?=E6=9D=A5=E7=9A=84=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/zh/base/configuration.md | 7 ------- .../spring/boot/MybatisFlexProperties.java | 15 +-------------- 2 files changed, 1 insertion(+), 21 deletions(-) diff --git a/docs/zh/base/configuration.md b/docs/zh/base/configuration.md index 66e523bb..e4c525d6 100644 --- a/docs/zh/base/configuration.md +++ b/docs/zh/base/configuration.md @@ -119,13 +119,6 @@ TypeHandler 扫描路径,如果配置了该属性,SqlSessionFactoryBean 会 是否控制台打印 MyBatis-Flex 的 LOGO 及版本号。 -### db-type - -- 类型:`DbType` -- 默认值:`DbType.MYSQL` - -显示指定数据库类型。 - ### key-config - 类型:`com.mybatisflex.core.FlexGlobalConfig.KeyConfig` diff --git a/mybatis-flex-spring-boot-starter/src/main/java/com/mybatisflex/spring/boot/MybatisFlexProperties.java b/mybatis-flex-spring-boot-starter/src/main/java/com/mybatisflex/spring/boot/MybatisFlexProperties.java index c61a862b..6891175d 100644 --- a/mybatis-flex-spring-boot-starter/src/main/java/com/mybatisflex/spring/boot/MybatisFlexProperties.java +++ b/mybatis-flex-spring-boot-starter/src/main/java/com/mybatisflex/spring/boot/MybatisFlexProperties.java @@ -17,7 +17,6 @@ package com.mybatisflex.spring.boot; import com.mybatisflex.core.FlexConsts; import com.mybatisflex.core.FlexGlobalConfig; -import com.mybatisflex.core.dialect.DbType; import org.apache.ibatis.io.VFS; import org.apache.ibatis.logging.Log; import org.apache.ibatis.mapping.ResultSetType; @@ -733,10 +732,6 @@ public class MybatisFlexProperties { */ private boolean printBanner = true; - /** - * 默认使用 Mysql 数据库类型。 - */ - private DbType dbType = DbType.MYSQL; /** * 全局的 ID 生成策略配置,当 @Id 未配置 或者 配置 KeyType 为 None 时 @@ -755,6 +750,7 @@ public class MybatisFlexProperties { */ private Object deletedValueOfLogicDelete = FlexConsts.LOGIC_DELETE_DELETED; + public boolean isPrintBanner() { return printBanner; } @@ -763,14 +759,6 @@ public class MybatisFlexProperties { this.printBanner = printBanner; } - public DbType getDbType() { - return dbType; - } - - public void setDbType(DbType dbType) { - this.dbType = dbType; - } - public FlexGlobalConfig.KeyConfig getKeyConfig() { return keyConfig; } @@ -798,7 +786,6 @@ public class MybatisFlexProperties { void applyTo(FlexGlobalConfig target) { PropertyMapper mapper = PropertyMapper.get().alwaysApplyingWhenNonNull(); mapper.from(isPrintBanner()).to(target::setPrintBanner); - mapper.from(getDbType()).to(target::setDbType); mapper.from(getKeyConfig()).to(target::setKeyConfig); mapper.from(getNormalValueOfLogicDelete()).to(target::setNormalValueOfLogicDelete); mapper.from(getDeletedValueOfLogicDelete()).to(target::setDeletedValueOfLogicDelete);