删除无用代码
This commit is contained in:
parent
425b689d81
commit
109bbad34b
@ -29,18 +29,4 @@ public class DatabaseUtil {
|
|||||||
public static Connection getConnection() throws SQLException {
|
public static Connection getConnection() throws SQLException {
|
||||||
return DriverManager.getConnection(URL, USERNAME, PASSWORD);
|
return DriverManager.getConnection(URL, USERNAME, PASSWORD);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 关闭数据库连接
|
|
||||||
* @param conn 要关闭的连接对象
|
|
||||||
*/
|
|
||||||
public static void closeConnection(Connection conn) {
|
|
||||||
if (conn != null) {
|
|
||||||
try {
|
|
||||||
conn.close();
|
|
||||||
} catch (SQLException e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user