HttpClient httpClient = HttpClientBuilder.create().setSSLSocketFactory(socketFactory).build();
无法解析HttpClientBuilder。任何人都知道如何解决这个问题?
答案 0 :(得分:4)
从https://hc.apache.org/downloads.cgi下载Apache HttpClient库并将jar添加到项目中或添加maven依赖项:
<dependencies>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5</version>
</dependency>
</dependencies>