클라이언트 모듈 REST
을 HttpClient.executeMethod(method)
에서 RestTemplate.postForLocation(uri, obj)
으로 바꿉니다. HttpClient
을 사용하면 메서드의 연결을 명시 적으로 해제합니다.RestTemplate이 자동으로 연결을 해제합니까?
deleteMethod.releaseConnection();
Spring
RestTemplate
내에있는 어떤 것도 찾을 수 없습니다. 자동으로 연결을 해제합니까? 묻는 또 다른 방법은 RestTemplate.postForLocation
을 호출 한 후에 아무 것도하지 않는 것이 안전할까요?
이 귀하의 질문에 대답 수도 http://stackoverflow.com/questions/31869193/using-spring-rest-template-either-creating-too-many-connections-or-slow –