mysql-connector8.0以上注册驱动和获取连接方式更新

Class.forName("com.mysql.cj.jdbc.Driver");
Connection conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/test?&useSSL=false&serverTimezone=UTC", "root", "root");

踩坑

猜你喜欢

转载自blog.csdn.net/kepengs/article/details/107931158