您的位置:首页 > 博客中心 > 数据库 >

mysql-jdbc创建connection理解

时间:2022-03-14 03:06

jdbc源码分析(http://blog.csdn.net/brilliancezhou/article/details/5499738)

创建JDBC连接代码

1 Class.forName("com.mysql.jdbc.Driver");
2 DriverManager.getConnection("jdbc:mysql://localhost:3306/test","user","password")

其中的getConnection()方法最终会调用NonRegisteringDriver的connect(String url, Properties info)方法。

后续调用画图如下:

gxlsystem.com,布布扣

 

热门排行

今日推荐

热门手游