Meaning and solution for Spring 3 error message? "Using getResponseBodyAsStream instead is recommended"
This occurs with the commons-httpclient API when the getResponseBody() method is used. The warning means that a response body could potentially be very large (such as a large file download, etc.) and loading the whole thing into memory at once as a String could be very inefficient. The way to avoid this potential inefficiency is to use getResponseBodyAsStream(), which will allow proper buffering and streaming of the response body.
I am not sure why Spring is using getResponseBody(). Could it be your HTTP client? Are you using a custom-written HTTP client to perform the request?
You can add configuration http.method.response.buffer.warnlimit=1024*1024*10
in the application.properties. it works for me.