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