编程语言
首页 > 编程语言> > java-RestEasy-ClientResponse.ReleaseConnection()

java-RestEasy-ClientResponse.ReleaseConnection()

作者:互联网

为什么我需要通过以下方式释放ClientResponse:

 response.releaseConnection();

有优势吗? RestEasy为什么不处理这个问题?

有时我必须释放它,有时我想要-条件如何?

解决方法:

Resteasy will release the connection under the covers. The only
counterexample is the case in which the response is an instance of
InputStream, which must be closed explicitly.

您可以在RESTEasy documentation.中阅读有关此内容的更多信息

标签:rest,response,resteasy,java
来源: https://codeday.me/bug/20191101/1981068.html