No subject alternative names matching IP address xxxxxx found


背景:RestTemplate.getForEntity方法 http請求 8443接口(日志里變成https),報錯

日志報錯:
I/O error on GET request for \"https://xxxxxxxxxx\": java.security.cert.CertificateException: No subject alternative names matching IP address xxxxxx found;
nested exception is javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: No subject alternative names matching IP address xxxxxx found
采用如下方法解決(可以添加證書或者跳過驗證,我采用跳過的方式)
https://blog.csdn.net/flyestcoder/article/details/113242087

再請求報400
RestTemplate將http請求修改為https
再測試就OK了


免責聲明!

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



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