既有适合小白学习的零基础资料,也有适合3年以上经验的小伙伴深入学习提升的进阶课程,涵盖了95%以上Go语言开发知识点,真正体系化!
由于文件比较多,这里只是将部分目录截图出来,全套包含大厂面经、学习笔记、源码讲义、实战项目、大纲路线、讲解视频,并且后续会持续更新
import com.mysql.jdbc.Driver;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.sql.Statement;
public class TestJDBCConnection {
public static void main(String[] args) {
//第一步:注册驱动
Statement statement=null;
Connection connection=null;
try {
DriverManager.registerDriver(new com.mysql.jdbc.Driver());
//第二步:创建连接
String url="jdbc:mysql://127.0.0.1:3306/mobilemallsystem";
String user="root";
String password="123456";
connection= DriverManager.getConnection(url,user, password);
// System.out.println("数据库连接对象"+connection);
//第三步:获取数据库操作对象(SQL语句执行对象)
statement= connection.createStatement();
//第四步:执行SQL语句
String sql="insert into usermessage(uname,upassword) values('666','666')";
statement.executeUpdate(sql);
//第五步:处理查询结果集
//第六步:释放资源
} catch (SQLException throwables) {
throwables.printStackTrace();
}finally {
if(statement!=null){
try {
statement.close();
![img](https://img-blog.csdnimg.cn/img_convert/765d4bbdd952b04318984ef53bfae358.png)
![img](https://img-blog.csdnimg.cn/img_convert/cf28dc8786f94d0b52f20fc2bc4b8efc.png)
![img](https://img-blog.csdnimg.cn/img_convert/32781a7ec5931c5d5e17f8aa68543d96.png)
**既有适合小白学习的零基础资料,也有适合3年以上经验的小伙伴深入学习提升的进阶课程,涵盖了95%以上Go语言开发知识点,真正体系化!**
**由于文件比较多,这里只是将部分目录截图出来,全套包含大厂面经、学习笔记、源码讲义、实战项目、大纲路线、讲解视频,并且后续会持续更新**
**[如果你需要这些资料,可以戳这里获取](https://bbs.csdn.net/topics/618658159)**
会持续更新**
**[如果你需要这些资料,可以戳这里获取](https://bbs.csdn.net/topics/618658159)**