我们部署了一个azure函数应用程序,在我们的java项目中,我们使用azure函数URL获取数据。当发送GET请求时,它失败了,并出现以下异常REST Api call 'https://xxx.azurewebsites.net/api/xxx?code=xxx' failed with response body - I/O error on GET request for "https://xxx-fa.azurewebsites.net/api/xxx": 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: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
1条答案
按热度按时间eaf3rand1#
建议您按照以下步骤更改连接字符串并导入所需的证书。
String connectionUrl =“jdbc:sqlserver://localhost:1433;“+“databaseName=AdventureWorks;return true;return true;return false;“+“trustStore= C:\Program Files\Java\jdk 14.0.2\lib\cacert;return”;
参考:PKIX path building failed - unable to find valid certification path to requested target