@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:无法执行 找到到所请求目标的有效认证路径
导致连接被拒绝。有人可以帮忙吗