Home > Database > Mysql Tutorial > 数据库连接池:Druid

数据库连接池:Druid

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-07 15:42:17
Original
1820 people have browsed it

从DBCP迁移到DruidDataSource,只需要修改数据源的实现类就可以了。 DBCP的数据库连接池的实现是: org.apache.commons.dbcp.BasicDataSource 替换为: com.alibaba.druid.pool.DruidDataSource 如果需要使用Druid的其他配置,可以参考http://code.alibabate

从DBCP迁移到DruidDataSource,只需要修改数据源的实现类就可以了。

DBCP的数据库连接池的实现是:

org.apache.commons.dbcp.BasicDataSource

替换为:

com.alibaba.druid.pool.DruidDataSource

如果需要使用Druid的其他配置,可以参考http://code.alibabatech.com/wiki/pages/viewpage.action?pageId=2916406

配置如下:

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template