問題一
Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver'.
The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary.
原因
加載類’com.mysql.jdbc.Driver’ 已經過時了。新的驅動類是“com.mysql.cj.jdbc.Driver”。驅動程序通過SPI自動註冊,而手動加載類通常是不必要的。
解決方案
1.使用8.0.13版本的驅動
2.將驅動 com.mysql.jdbc.Driver 改爲 com.mysql.cj.jdbc.Driver
問題二
The server time zone value '�й���ʱ��' is unrecognized or represents more than one time zone.
You must configure either the server or JDBC driver (via the serverTimezone configuration property) to use a
more specifc time zone value if you want to utilize time zone support.
原因
服務器時區值’�й���ʱ��’ 無法識別或代表一個以上的時區。如果希望利用時區支持,則必須配置服務器或JDBC驅動程序(通過serverTimezone配置屬性)以使用更具體的時區值。
解決方案
jdbc.url 數據庫名稱後面加上
?serverTimezone=CTT&useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true
如下圖: