错误 :
httpclient 版本
处理方式:
CloseableHttpClient httpclient = null;
try {
SSLConnectionSocketFactory scsf = new SSLConnectionSocketFactory(
SSLContexts.custom().loadTrustMaterial(null, new TrustSelfSignedStrategy()).build(),
NoopHostnameVerifier.INSTANCE
);
httpclient = HttpClients.custom().setSSLSocketFactory(scsf).build();
// CloseableHttpClient httpclient = HttpClients.createDefault();
} catch (NoSuchAlgorithmException e) {
throw new RuntimeException(e);
} catch (KeyStoreException e) {
throw new RuntimeException(e);
} catch (KeyManagementException e) {
throw new RuntimeException(e);
}