c3p0-config.xml 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. <c3p0-config>
  2. <!-- 默认配置,如果没有指定则使用这个配置 -->
  3. <default-config>
  4. <!-- 基本配置 -->
  5. <property name="driverClass">com.mysql.cj.jdbc.Driver</property>
  6. <property name="jdbcUrl">jdbc:mysql://127.0.0.1:3306/teamessage?serverTimezone=UTC</property>
  7. <property name="user">root</property>
  8. <property name="password">1314</property>
  9. <!--扩展配置-->
  10. <property name="checkoutTimeout">30000</property>
  11. <property name="idleConnectionTestPeriod">30</property>
  12. <property name="initialPoolSize">10</property>
  13. <property name="maxIdleTime">30</property>
  14. <property name="maxPoolSize">100</property>
  15. <property name="minPoolSize">10</property>
  16. <property name="maxStatements">200</property>
  17. </default-config>
  18. <!-- 命名的配置 -->
  19. <named-config name="itcast">
  20. <property name="driverClass">com.mysql.jdbc.Driver</property>
  21. <property name="jdbcUrl">jdbc:mysql://127.0.0.1:3306/xxxx</property>
  22. <property name="user">root</property>
  23. <property name="password">1234</property>
  24. <!-- 如果池中数据连接不够时一次增长多少个 -->
  25. <property name="acquireIncrement">5</property>
  26. <property name="initialPoolSize">20</property>
  27. <property name="minPoolSize">10</property>
  28. <property name="maxPoolSize">40</property>
  29. <property name="maxStatements">20</property>
  30. <property name="maxStatementsPerConnection">5</property>
  31. </named-config>
  32. </c3p0-config>