Doesn't accept Spring MVC ResponseEntity<Resource> an ImputStreamResource?
问题 I'm trying to send a jpg image with Spring MVC using ResponseEntity<Resource> as the controller method response type. If the resource is a FileSystemResource it works fine but when I try to use an InputStreamResource the ResourceHttpMessageConverter ask for the content lenght and InputStreamResource throws an exception (from AbstractResource method because there is not any file to read lenght from). ResourceHttpMessageConverter would continue if the method returned null instead. Is there any