This commit is contained in:
Looly 2021-03-16 14:22:01 +08:00
parent 948adebeb7
commit 825b5ea1b4
3 changed files with 9 additions and 2 deletions

View File

@ -10,9 +10,11 @@
* 【core 】 IoUtil增加lineIter方法
* 【core 】 新增函数式懒加载加载器(pr#275@Gitee)
* 【http 】 UserAgentUtil增加miniProgram判断(issue#1475@Github)
* 【db 】 增加Ignite数据库驱动识别
### Bug修复
* 【core 】 修复IoUtil.readBytes的FileInputStream中isClose参数失效问题issue#I3B7UD@Gitee
* 【core 】 修复DataUnit中KB不大写的问题
-------------------------------------------------------------------------------------------------------------

View File

@ -44,7 +44,7 @@ public enum DataUnit {
*/
TERABYTES("TB", DataSize.ofTerabytes(1));
public static final String[] UNIT_NAMES = new String[]{"B", "kB", "MB", "GB", "TB", "PB", "EB"};
public static final String[] UNIT_NAMES = new String[]{"B", "KB", "MB", "GB", "TB", "PB", "EB"};
private final String suffix;
@ -61,7 +61,7 @@ public enum DataUnit {
}
/**
* 通过后缀返回对应的 {@link DataUnit}
* 通过后缀返回对应的 DataUnit
*
* @param suffix 单位后缀
* @return 匹配到的{@link DataUnit}

View File

@ -52,6 +52,8 @@ public class DialectFactory {
public static final String DRIVER_DM7 = "dm.jdbc.driver.DmDriver";
/** JDBC 驱动 人大金仓 */
public static final String DRIVER_KINGBASE8 = "com.kingbase8.Driver";
/** JDBC 驱动 Ignite thin */
public static final String DRIVER_IGNITE_THIN = "org.apache.ignite.IgniteJdbcThinDriver";
private static final Map<DataSource, Dialect> DIALECT_POOL = new ConcurrentHashMap<>();
@ -138,6 +140,9 @@ public class DialectFactory {
} else if (nameContainsProductInfo.contains("kingbase8")) {
// 人大金仓8
driver = DRIVER_KINGBASE8;
} else if (nameContainsProductInfo.contains("ignite")) {
// Ignite thin
driver = DRIVER_IGNITE_THIN;
}
return driver;