mysql8.0以后 修改了jdbc连接的参数
原来的注册驱动为:
com.mysql.jdbc.Driver
现在需要修改为:
com.mysql.cj.jdbc.Driver
原来获取连接加载的url为:
jdbc:mysql://localhost:3306/表名
现在需要修改为(注意每个条件之间要用分号):
jdbc:mysql://localhost:3306/表名?characterEncoding=utf-8&useUnicode=true&serverTimezone=GMT&useSSL=false