|
|
|
@ -1,5 +1,6 @@ |
|
|
|
|
package org.panda.jdbc; |
|
|
|
|
|
|
|
|
|
import com.sun.xml.internal.bind.v2.TODO; |
|
|
|
|
import org.panda.code.uitl.PropsUtil; |
|
|
|
|
import org.panda.code.uitl.StringUtil; |
|
|
|
|
import org.panda.jdbc.helper.DbConfigInterface; |
|
|
|
@ -21,7 +22,9 @@ public class JdbcUtils { |
|
|
|
|
* 线程安全 |
|
|
|
|
*/ |
|
|
|
|
private static final ThreadLocal<Connection> CONNECTION_HOLDER = new ThreadLocal<>(); |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 数据源 |
|
|
|
|
*/ |
|
|
|
|
private DataSource dataSource; |
|
|
|
|
|
|
|
|
|
public JdbcUtils(DataSource dataSource){ |
|
|
|
@ -143,7 +146,6 @@ public class JdbcUtils { |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 创建表 |
|
|
|
|
* |
|
|
|
|
* @param sql |
|
|
|
|
*/ |
|
|
|
|
public void createTable(String sql) { |
|
|
|
@ -169,7 +171,6 @@ public class JdbcUtils { |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 查询 |
|
|
|
|
* |
|
|
|
|
* @param sql |
|
|
|
|
* @param params |
|
|
|
|
* @param rsh |
|
|
|
@ -201,7 +202,6 @@ public class JdbcUtils { |
|
|
|
|
* @param st |
|
|
|
|
* @param rs |
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
public void release(Connection conn, Statement st, ResultSet rs) { |
|
|
|
|
if (rs != null) { |
|
|
|
|
try { |
|
|
|
|