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;
		}
	}
}
最近下载更多
WenMeng  LV9 2024年12月2日
PISCESPLUS  LV5 2024年9月3日
仙女山的月亮  LV2 2024年5月22日
微信网友_6790506018131968  LV1 2024年1月3日
asddwh  LV13 2023年12月26日
17693282606  LV12 2023年12月20日
李朝磊  LV18 2023年12月7日
qiangmin1223  LV12 2023年4月24日
wwfl02  LV3 2022年12月5日
485415187  LV6 2022年11月20日
最近浏览更多
新哥新奇士橙  LV4 1月26日
WenMeng  LV9 2024年12月2日
PISCESPLUS  LV5 2024年9月3日
xiao小果  LV13 2024年8月24日
柳咪华沙  LV7 2024年6月29日
范德萨发顺丰的  LV1 2024年6月16日
123momom 2024年6月9日
暂无贡献等级
123456cjj  LV1 2024年6月2日
仙女山的月亮  LV2 2024年5月22日
op123129 2024年4月15日
暂无贡献等级
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友