diff --git a/src/util/DatabaseUtil.java b/src/util/DatabaseUtil.java index 515b2e8..d01f2c2 100644 --- a/src/util/DatabaseUtil.java +++ b/src/util/DatabaseUtil.java @@ -29,18 +29,4 @@ public class DatabaseUtil { public static Connection getConnection() throws SQLException { 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(); - } - } - } }