document.write("");

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了

posted @ 2021-10-19 16:57  人间春风意  阅读(4036)  评论(0)    收藏  举报