package com.tushugl.DbUtil;
import java.sql.*;
public class Dbutil {
	public static Connection conn = null;
	
	public static Connection getConn() {
		try {
			Class.forName("com.mysql.jdbc.Driver");
		} catch (ClassNotFoundException e) {

			e.printStackTrace();
		}
		try {
			conn = DriverManager.getConnection(
					"jdbc:mysql://localhost:3306/mydb", "root", "123456");
		} catch (SQLException e) {

			e.printStackTrace();
		}
		return conn;
	}

	public static void close() {
		try {
			if (conn != null) {
				conn.close();
			}
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}
最近下载更多
xiaoyu111ewsd  LV4 1月7日
taoshen95  LV14 1月5日
我的心里面激动  LV1 1月4日
Kaiaahh  LV1 2023年12月30日
微信网友_5986558820093952  LV3 2023年12月26日
lang嘻嘻嘻  LV1 2023年12月25日
xxxueaaaa  LV1 2023年12月24日
微信网友_6779895352037376  LV1 2023年12月15日
微信网友_6430036841664512  LV2 2023年7月31日
微信网友_6551318769733632  LV1 2023年7月7日
最近浏览更多
pi-nang  LV2 3月11日
xiaoyu111ewsd  LV4 1月7日
我的心里面激动  LV1 1月4日
minjiang110  LV3 1月3日
hxy19991216  LV4 1月2日
wiehwhfe  LV1 1月1日
Kaiaahh  LV1 2023年12月30日
17693282606  LV11 2023年12月26日
asddwh  LV12 2023年12月25日
lang嘻嘻嘻  LV1 2023年12月25日
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友