HTTPS双向验证客户端访问服务端报错:
org.springframework.web.client.ResourceAccessException: I/O error on POST request for "https://xxxxx.xxxxx:8888/9": Certificate for <xxxxx.xxxxx> doesn't match any of the subject alternative names: []; nested exception is javax.net.ssl.SSLPeerUnverifiedException: Certificate for <xxxxx.xxxxx> doesn't match any of the subject alternative names: []
at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:744)
at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:670)
at org.springframework.web.client.RestTemplate.postForEntity(RestTemplate.java:445)
Caused by: javax.net.ssl.SSLPeerUnverifiedException: Certificate for <xxxxx.xxxxx> doesn't match any of the subject alternative names: []
原因:双方的使用的证书不一致导致的,可以重新同步一下证书。