修复SettingLoaderload未抛出异常导致配置文件无法正常遍历的问题(pr#3868@Github)

This commit is contained in:
Looly
2025-02-24 10:24:59 +08:00
parent 4ef8814c14
commit 1c0b6c3da1
9 changed files with 29 additions and 22 deletions

View File

@@ -0,0 +1,10 @@
package cn.hutool.db;
import org.junit.jupiter.api.Test;
public class GlobalDbConfigTest {
@Test
void createDbSettingTest(){
GlobalDbConfig.createDbSetting();
}
}

View File

@@ -51,4 +51,4 @@ idleConnectionTestPeriod = 0
# c3p0全局的PreparedStatements缓存的大小。如果maxStatements与maxStatementsPerConnection均为0则缓存不生效只要有一个不为0则语句的缓存就能生效。如果默认值: 0
maxStatements = 0
# maxStatementsPerConnection定义了连接池内单个连接所拥有的最大缓存statements数。默认值: 0
maxStatementsPerConnection = 0
maxStatementsPerConnection = 0

View File

@@ -48,4 +48,4 @@ testOnBorrow = false
# (boolean) 指明是否在归还到池中前进行检验 注意: 设置为true 后如果要生效validationQuery 参数必须设置为非空字符串
testOnReturn = false
# (boolean) 指明连接是否被空闲连接回收器( 如果有) 进行检验。 如果检测失败, 则连接将被从池中去除。注意: 设置为true 后如果要生效validationQuery 参数必须设置为非空字符串
testWhileIdle = false
testWhileIdle = false

View File

@@ -52,4 +52,4 @@ connectionInitSqls = SELECT 1
# 属性类型是字符串,通过别名的方式配置扩展插件, 常用的插件有: 监控统计用的filter:stat 日志用的filter:log4j 防御sql注入的filter:wall
filters = stat
# 类型是List<com.alibaba.druid.filter.Filter> 如果同时配置了filters和proxyFilters 是组合关系,并非替换关系
proxyFilters =
proxyFilters =

View File

@@ -40,4 +40,4 @@ minimumIdle = 10
# 连接池中允许的最大连接数。缺省值10推荐的公式((core_count * 2) + effective_spindle_count)
maximumPoolSize = 10
# 连接只读数据库时配置为true 保证安全
readOnly = false
readOnly = false

View File

@@ -48,4 +48,4 @@ testOnBorrow = false
# (boolean) 指明是否在归还到池中前进行检验 注意: 设置为true 后如果要生效validationQuery 参数必须设置为非空字符串
testOnReturn = false
# (boolean) 指明连接是否被空闲连接回收器( 如果有) 进行检验。 如果检测失败, 则连接将被从池中去除。注意: 设置为true 后如果要生效validationQuery 参数必须设置为非空字符串
testWhileIdle = false
testWhileIdle = false