zoukankan      html  css  js  c++  java
  • c3p0连接池配置问题

    正确配置文件

     1 <?xml version="1.0" encoding="UTF-8"?>
     2 
     3 <c3p0-config>
     4 
     5     <named-config name="mvcapp">
     6         <property name="user">root</property>
     7         <property name="password">Ouyangan</property>
     8         <property name="driverClass">com.mysql.jdbc.Driver</property>
     9         <property name="jdbcUrl">jdbc:mysql://localhost:3306/mysql</property>
    10 
    11         <property name="acquireIncrement">5</property>
    12         <property name="initialPoolSize">10</property>
    13         <property name="minPoolSize">10</property>
    14         <property name="maxPoolSize">15</property>
    15 
    16         <!-- intergalactoApp adopts a different approach to configuring statement 
    17             caching -->
    18         <property name="maxStatements">20</property>
    19         <property name="maxStatementsPerConnection">5</property>
    20 
    21     </named-config>
    22 </c3p0-config>

      整个过程是看视频对着敲得,但是在这一行出现错误.

    <property name="jdbcUrl">jdbc:mysql:///localhost:3306/mysql</property>

      正确写法是"//"

    <property name="jdbcUrl">jdbc:mysql://localhost:3306/mysql</property>
  • 相关阅读:
    JOI2017FinalC JOIOI 王国
    JOISC2017C 手持ち花火
    P4336 [SHOI2016]黑暗前的幻想乡
    SP104 HIGH
    P3160 [CQOI2012]局部极小值
    P4965 薇尔莉特的打字机
    【BZOJ4361】isn
    P3506 [POI2010]MOT-Monotonicity 2
    P3214 [HNOI2011]卡农
    P3704 [SDOI2017]数字表格
  • 原文地址:https://www.cnblogs.com/Ouyangan/p/4183686.html
Copyright © 2011-2022 走看看