eclipse 運行企業進銷存管理系統

1.運行 “企業進銷存管理系統” 源碼

2.

3.本地mysql是8.0.15,所以項目導入mysql-connector-java-8.0.15.jar,刪除原來的mysql_connector_java_5.1.36_bin.jar

運行後有報錯

1.
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
2.  JDBC中The server time zone value '???ú±ê×??±??' is ............. 的錯誤

 

解決方案.修改DAO層,DAO.java

原來是

	protected static String dbClassName = "com.mysql.jdbc.Driver";// MySQL數據庫驅動類的名稱
	protected static String dbUrl = "jdbc:mysql://127.0.0.1:3306/db_database28";// 訪問MySQL數據庫的路徑

 

修改爲

protected static String dbClassName = "com.mysql.cj.jdbc.Driver";// MySQL數據庫驅動類的名稱
protected static String dbUrl = "jdbc:mysql://localhost:3306/db_database28?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=GMT";// 訪問MySQL數據庫的路徑

運行成功!

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章