mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
fix poi
This commit is contained in:
@@ -33,6 +33,11 @@ public class BeeDSFactory extends AbstractDSFactory {
|
||||
final BeeDataSourceConfig beeConfig = new BeeDataSourceConfig(driver, jdbcUrl, user, pass);
|
||||
poolSetting.toBean(beeConfig);
|
||||
|
||||
// 修复BeeCP默认参数无效问题
|
||||
if(beeConfig.getBorrowConcurrentSize() > beeConfig.getMaxActive()){
|
||||
beeConfig.setMaxActive(beeConfig.getBorrowConcurrentSize() + 1);
|
||||
}
|
||||
|
||||
// remarks等特殊配置,since 5.3.8
|
||||
String connValue;
|
||||
for (String key : KEY_CONN_PROPS) {
|
||||
|
@@ -2,6 +2,7 @@ package cn.hutool.db;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.db.ds.DSFactory;
|
||||
import cn.hutool.db.ds.bee.BeeDSFactory;
|
||||
import cn.hutool.db.ds.c3p0.C3p0DSFactory;
|
||||
import cn.hutool.db.ds.dbcp.DbcpDSFactory;
|
||||
import cn.hutool.db.ds.druid.DruidDSFactory;
|
||||
@@ -59,6 +60,15 @@ public class DsTest {
|
||||
Assert.assertTrue(CollUtil.isNotEmpty(all));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void beeCPDsTest() throws SQLException {
|
||||
DSFactory.setCurrentDSFactory(new BeeDSFactory());
|
||||
DataSource ds = DSFactory.get("test");
|
||||
Db db = Db.use(ds);
|
||||
List<Entity> all = db.findAll("user");
|
||||
Assert.assertTrue(CollUtil.isNotEmpty(all));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void dbcpDsTest() throws SQLException {
|
||||
DSFactory.setCurrentDSFactory(new DbcpDSFactory());
|
||||
|
Reference in New Issue
Block a user