目录
1,创建数据库
2, 数据库链接
private static Connection con=null;
public static Connection getCon() throws ClassNotFoundException, SQLException {
Class.forName("com.mysql.cj.jdbc.Driver");
con=DriverManager.getConnection("jdbc:mysql://127.0.0.1:3306/school?useSSL=false&serverTimezone=UTC","root","root");
System.out.println(con);
return con;
}
public static void close(ResultSet rs, PreparedStatement ps,Connection con){
try {
if (rs!=null){
rs.close();
}
if (ps!=null){