c3p0 xml配置文件模版
Posted Tidhy
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了c3p0 xml配置文件模版相关的知识,希望对你有一定的参考价值。
1 <c3p0-config> 2 <default-config> 3 <property name="driverClass">com.mysql.jdbc.Driver</property> 4 <property name="jdbcUrl">jdbc:mysql://localhost:3306/day16</property> 5 <property name="user">root</property> 6 <property name="password">root</property> 7 8 <property name="initialPoolSize">10</property> 9 <property name="maxIdleTime">30</property> 10 <property name="maxPoolSize">20</property> 11 <property name="minPoolSize">5</property> 12 <property name="maxStatements">200</property> 13 </default-config> 14 15 <named-config name="mysql"> 16 <property name="acquireIncrement">50</property> 17 <property name="initialPoolSize">100</property> 18 <property name="minPoolSize">50</property> 19 <property name="maxPoolSize">1000</property><!-- intergalactoApp adopts a different approach to configuring statement caching --> 20 <property name="maxStatements">0</property> 21 <property name="maxStatementsPerConnection">5</property> 22 </named-config> 23 24 <named-config name="oracle"> 25 <property name="acquireIncrement">50</property> 26 <property name="initialPoolSize">100</property> 27 <property name="minPoolSize">50</property> 28 <property name="maxPoolSize">1000</property><!-- intergalactoApp adopts a different approach to configuring statement caching --> 29 <property name="maxStatements">0</property> 30 <property name="maxStatementsPerConnection">5</property> 31 </named-config> 32 </c3p0-config>
以上是关于c3p0 xml配置文件模版的主要内容,如果未能解决你的问题,请参考以下文章
Spring中c3p0连接池的配置 及JdbcTemplate的使用 通过XML配置文件注入各种需要对象的操作 来完成数据库添加Add()方法