今天學(xué)Spring Boot鏈接JDBC池遇到了這個(gè)問題:
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.
其實(shí)這個(gè)問題不大,程序也能正常運(yùn)行成功,但是出于強(qiáng)迫癥的我看見這串紅字就賊不舒服,我把這個(gè)警告復(fù)制下來給翻譯了一下,大概意思就是:
警告:不建議在沒有服務(wù)器身份驗(yàn)證的情況下建立SSL連接。根據(jù)MySQL 5.5.45+,如果沒有設(shè)置顯式選項(xiàng),默認(rèn)情況下必須建立5.6.26+和5.7.6+要求的SSL連接。你需要通過設(shè)置useSSL=false顯式禁用SSL,或者設(shè)置useSSL=true并為服務(wù)器證書驗(yàn)證提供信任存儲(chǔ)。
這個(gè)問題很好解決,它的警告里已經(jīng)提示了你修改方法:You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
?在我的xml配置文件里我把它改成了 "useSSL=false"
?這樣問題就成功解決啦~~~~文章來源:http://www.zghlxwxcb.cn/news/detail-529577.html
PS:如果false不行就改成true,值得注意的是在xml文件里"&"字符是不支持直接存儲(chǔ)的,要進(jìn)行字符的轉(zhuǎn)義"&",一定要找到你對(duì)應(yīng)的xml文件哦文章來源地址http://www.zghlxwxcb.cn/news/detail-529577.html
到了這里,關(guān)于解決“WARN: Establishing SSL connection without server‘s identity verification is not recommended.”問題的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!