Public Key Retrieval is not allowed錯誤


今天在整合SSM時,出現錯誤Public Key Retrieval is not allowed,百度多次后解決辦法最終解決辦法有兩種:

1. mysql5及之前的版本使用的是舊版驅動"com.mysql.jdbc.Driver",mysql6以及之后的版本需要更新到新版驅動,對應的Driver是"com.mysql.cj.jdbc.Driver",但是這個驅動錯誤的信息是"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. 連接數據庫的url中,加上allowPublicKeyRetrieval=true參數。

最終,第2方案解決該問題。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM