您的位置:首页 > 产品设计 > UI/UE

[DruidAbstractDataSource] maxIdle is deprecated

2015-11-10 14:34 1226 查看
问题:我项目用的是com.alibaba.druid.pool.DruidDataSource这个数据源,项目启动的时候报这种问题:maxIdle is deprecated,maxIdle属性被忽略(过时的)

环境:数据源jar用的是druid0.2.9 

分析问题:

打开源代码看到:

标记这个方法已经过时了。

替代方案:

the maxIdle property for Druid compatible with DBCP, maxIdle is a confusing concept. the connection pool should only maxPoolSize and minPoolSize,druid retain only maxActive and minIdle, respectively the equivalent maxPoolSize and minPoolSize.说明maxIdle已经被替代了,用maxActive和minIdle来表示数据库连接池的maxPoolSize和minPoolSize.
参考文档:https://github.com/alibaba/druid/wiki/FAQ

https://github.com/alibaba
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: