package com.yuki.dao;
import java.sql.*;
public class DbConnection {
private static String url = "jdbc:mysql://localhost:3306/hrmanagement?characterEncoding=utf-8&useSSL=false";
private static String user = "root";
private static String pass = "root";
static {
try {
Class.forName("com.mysql.jdbc.Driver");
} catch (ClassNotFoundException e) {
e.printStackTrace();
}
}
public static Connection getConn() {
Connection conn = null;
try {
conn = DriverManager.getConnection(url,user,pass);
} catch (SQLException e) {
e.printStackTrace();
}
return conn;
}
public static void getClose(java.sql.Connection conn, PreparedStatement pst, ResultSet rst) {
try {
if (rst != null)
rst.close();
if (pst != null)
pst.close();
if (conn != null)
conn.close();
} catch (SQLException e) {
e.printStackTrace();
}
}
}
最近下载更多
long123_356 LV8
2024年12月22日
cong58cong LV8
2024年6月26日
今晚都别睡啦 LV9
2024年6月1日
微信网友_6906962132258816 LV7
2024年3月22日
RAINK_L LV3
2023年12月13日
jiemomo LV12
2023年10月19日
微信网友_6672184532766720 LV3
2023年10月10日
诺一啊啊啊啊啊 LV3
2023年6月15日
KAIzx11 LV8
2023年6月13日
gala209 LV3
2023年2月2日
最近浏览更多
jaonsang LV25
7月20日
18028265352 LV1
6月22日
444105047 LV6
1月17日
cxdddd LV1
2024年12月31日
yongle LV1
2024年12月31日
long123_356 LV8
2024年12月22日
120_wu LV4
2024年12月2日
yimaoermao LV1
2024年11月28日
张泽帅 LV6
2024年10月18日
040313 LV1
2024年10月16日

