老師的服務在啟動的時候沒有關于數據庫連接的SSL的警告嗎
按照老師的配置添加了依賴和數據庫連接信息,但是在啟動的時候,控制臺有如下紅色警告:
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.
網上說,需要在數據庫連接的URL中添加 useSSL=false|true
如下:
jdbc:mysql://127.0.0.1:3306/springboot?useSSL=false
但是不管我是填寫useSSL=true,還是填寫 useSSL=false ,這個警告都一直存在,怎么處理呢
2018-06-27
我寫錯了,由于沒有注意到配置文件最下方還有一遍,最終導致下面的把上面的給覆蓋了,但是下面的寫法是之前你的,并沒有追加 useSSL 字段導致
經過測試:無論使用useSSL=true還是useSSL=false,均可以解決控制臺出現警告的問題