67,512
社区成员
发帖
与我相关
我的任务
分享
cm = new PoolingHttpClientConnectionManager();
cm.setMaxTotal(100);
cm.setDefaultMaxPerRoute(20);
SocketConfig socketConfig = SocketConfig.custom()
.setSoKeepAlive(true)
.build();
cm.setDefaultSocketConfig(socketConfig);
httpclient=HttpClients.custom().setConnectionManager(cm).build();