移除 db-type 的配置,这个配置为 flex 自动读取的数据源分析出来的。

This commit is contained in:
开源海哥 2023-06-22 12:35:47 +08:00
parent b9394780c7
commit a6baca92a2
2 changed files with 1 additions and 21 deletions

View File

@ -119,13 +119,6 @@ TypeHandler 扫描路径如果配置了该属性SqlSessionFactoryBean 会
是否控制台打印 MyBatis-Flex 的 LOGO 及版本号。
### db-type
- 类型:`DbType`
- 默认值:`DbType.MYSQL`
显示指定数据库类型。
### key-config
- 类型:`com.mybatisflex.core.FlexGlobalConfig.KeyConfig`

View File

@ -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);