RestTemplate 请求https问题?

通过RestTemplate 请求https 服务,报错如下:

org.springframework.web.client.ResourceAccessException: I/O error on POST request for 
"https://xxx.com/edu_api/pay": sun.security.validator.ValidatorException: 
PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to 
find valid certification path to requested target; nested exception is 
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building                 
 failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid 
 certification path to requested target
at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:674)
at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:621)



clipboard.png

阅读 8.9k
1 个回答
推荐问题