I have a method which returns ResponseEntity(InputStreamResource). In this method, I\'m getting InputStream from a file based on the filename input and then
The underlying class where this is handled is ResourceHttpMessageConverter and it closes the underlying input stream as is evident from here