關於這個錯誤的解釋百度上有一大堆,關於解決方法找了很久才看到了個情況和自己一樣的也解決了。
首先情況是在寫MVC配置運行后,一直都顯示有這個錯
Fri Mar 30 14:55:35 CST 2018 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
之前沒有用mvc連接數據庫的時候報這個錯誤直接在連接數據庫地址后面加上useSSL=false就可以解決了
本來輕車熟路的我很熟練的在連接池后加上了useSSL=false,如下
可是這次並沒有解決,而且出現了新的錯誤如下:
后來百度了一些發現需要轉義,然后按照下面的寫就對了。(試了這個就對了就發出來了,畢竟耽誤了我好長時間)
jdbc:mysql://127.0.0.1:3306/li?characterEncoding=utf8&useSSL=false"
原文路徑:https://blog.csdn.net/huang_xin2016/article/details/79757799