zoukankan      html  css  js  c++  java
  • C3P0配置

    C3P0-config.xml

    <?xml version="1.0" encoding="UTF-8"?>
    <c3p0-config>
    <!-- This app is massive! -->
    <named-config name="mvcapp">//
    
    <property name="user">root</property>
    <property name="password">123456</property>
    <property name="driverclass">com.mysql.jdbc.Driver</property>
    <property name="jdbcUrl">jdbc:mysql://127.0.0.1/customers</property>
    
    <property name="password">123456</property>
    <property name="acquireIncrement">5</property>
    <property name="initialPoolSize">10</property>
    <property name="minPoolSize">10</property>
    <property name="maxPoolSize">50</property>
    
    <!-- intergalactoApp adopts a different approach to configuring statement caching -->
    <property name="maxStatements">20</property>
    <property name="maxStatementsPerConnection">5</property>
    
    </named-config>
    </c3p0-config>
    

    其中mvcapp在后面DButils中连接数据库使用
    记得加入C3P0的jar包

    假如C3P0出现No Suitable driver
    解决方案 :在%JAVA_HOME%jrelibext下添加mysql-connector-java-5.1.12-bin.jar 问题解决!

  • 相关阅读:
    leetcode之Search in Rotated Sorted Array
    leetcode之Search Insert Position2
    leetcode之Search Insert Position
    二分查找之Search for a Range
    leetcode之Two Sum
    leetcode之Spiral Matrix II
    leetcode之Spiral Matrix
    杨辉三角
    周计划1[7.22~7.28]
    英美音的比较
  • 原文地址:https://www.cnblogs.com/bingo2-here/p/7501764.html
Copyright © 2011-2022 走看看