Wiremock https连接被拒绝

时间:2019-03-20 05:21:44

标签: wiremock

@Rule
public WireMockServer wireMockServer = null;


public void setUp(File file) throws Exception {
    wireMockServer = new WireMockRule(options().dynamicPort().dynamicHttpsPort());
    wireMockServer.start();

    WireMock.configureFor("https","localhost", wireMockServer.httpsPort());
    WireMock.configureFor("localhost", wireMockServer.port());

}
  

错误:javax.net.ssl.SSLHandshakeException:   sun.security.validator.ValidatorException:PKIX路径构建失败:   sun.security.provider.certpath.SunCertPathBuilderException:无法执行   找到到所请求目标的有效认证路径

导致连接被拒绝。有人可以帮忙吗

  1. 嘲笑http->正常运行
  2. 嘲笑https->时,显示连接被拒绝。

0 个答案:

没有答案