[DruidAbstractDataSource] maxIdle is deprecated
2015-11-10 14:34
1226 查看
问题:我项目用的是com.alibaba.druid.pool.DruidDataSource这个数据源,项目启动的时候报这种问题:maxIdle is deprecated,maxIdle属性被忽略(过时的)
环境:数据源jar用的是druid0.2.9
分析问题:
打开源代码看到:
![](https://oscdn.geek-share.com/Uploads/Images/Content/202011/12/1802006b8b85bce778fccd558aa2293c)
标记这个方法已经过时了。
替代方案:
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
环境:数据源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
相关文章推荐
- easyui的树表格使用总结
- SEC phase
- (转)ZwQuerySystemInformation枚举内核模块及简单应用
- 快速排序 温习 QuickSort
- build-tools
- iOS小技巧-UITableView禁止上下滑动超出顶部或者底部的内容
- java.sql.SQLException: No suitable driver found for
- UILable
- [LeetCode] Range Sum Query - Immutable
- break;与continue;的区别
- Android快速SDK(2)View库QuickView
- 视图view,序列sequence
- hdu2767Proving Equivalences【STL版SCCTarjan+缩点】(有注释)
- Nova Liberty blueprints
- 严重: Context [] startup failed due to previous errors
- 移动端 UI 适配最佳实践(中)
- PHP的post数据与request数据
- GDI+ 使用指南(basic guiding of GDI plus )
- [leetcode-303]Range Sum Query - Immutable
- UISegmentedControl分段视图