不要用c3p0.properties文件配置,我試了沒成功,用c3p0-config.xml文件來配置連接池可以成功
<c3p0-config>
<default-config>
<property name="driverClass">com.mysql.jdbc.Driver</property>
<property name="user">root</property>
<property name="password">root</property>
<property name="jdbcUrl">jdbc:mysql..</property>
.
<c3p0-config>
<default-config>
<property name="driverClass">com.mysql.jdbc.Driver</property>
<property name="user">root</property>
<property name="password">root</property>
<property name="jdbcUrl">jdbc:mysql..</property>
.
2016-10-08
3個jdbcp連接池的jar下載地址:http://download.csdn.net/detail/peng_hong_fu/9647235;
文件路徑 String configFile = "resources/dbcp.properties";
空指針異常使用文件輸入流
File file = new File(configFile);
FileInputStream in = new FileInputStream(file);
// 讀取配置文件
pops.load(in);
文件路徑 String configFile = "resources/dbcp.properties";
空指針異常使用文件輸入流
File file = new File(configFile);
FileInputStream in = new FileInputStream(file);
// 讀取配置文件
pops.load(in);
2016-10-08
1414 輸入要是形如 @XXX 的值,如@num。
Parameters: OUT `counts` int
@n
Return values: 8
Parameters: OUT `counts` int
@n
Return values: 8
2016-10-06