jdbc8.0 配置時需要使用
Class.forName(“com.mysql.cj.jdbc.Driver”);
下面這個已經過時了
Class.forName(“com.mysql.jdbc.Driver”);
而且需要設置時區否會報亂碼的異常
java.sql.SQLException: The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents more than one time zone.
"jdbc:mysql://localhost:3306/test?&serverTimezone=UTC"