package com.tcd.conn;

import java.sql.Connection;
import java.sql.DriverManager;

public class conn {
	/**
	 * 数据库连接类
	 * @return
	 */
	
	public Connection getCon(){
		
		try {
			Class.forName("com.mysql.jdbc.Driver");
			String url = "jdbc:mysql://localhost/guanlistudent";
			String user = "root";
			String password = "123456";
			Connection conn = DriverManager.getConnection(url, user, password);
			//System.out.println(conn);
			return conn;
		} catch (Exception e) {
			e.printStackTrace();
			return null;
		}
	}
}
最近下载更多
asddwh  LV12 2023年12月26日
17693282606  LV11 2023年12月20日
李朝磊  LV18 2023年12月7日
qiangmin1223  LV12 2023年4月24日
wwfl02  LV3 2022年12月5日
485415187  LV6 2022年11月20日
lvhongquan  LV11 2022年6月16日
Xuan_0426  LV5 2022年6月7日
3305787467  LV12 2022年5月23日
最近浏览更多
op123129 4月15日
暂无贡献等级
李先婷 bkxo  LV2 1月29日
222dsff 1月5日
暂无贡献等级
WBelong  LV7 2023年12月27日
asddwh  LV12 2023年12月26日
求学的熊猫  LV6 2023年12月25日
gecongkai  LV8 2023年12月24日
微信网友_6791526949031936 2023年12月24日
暂无贡献等级
gbvggg 2023年12月24日
暂无贡献等级
微信网友_6790506018131968  LV1 2023年12月23日
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友