Why Can't I use ResponseEntity<?> annotation with StreamingResponseBody body type?

48
February 11, 2019, at 6:50 PM

I am trying to return a ResponseEntity Object with my Spring Action, the response entity mainly going to be ResponseEntity<StreamingResponseBody>. Although if an exception occures I am required to return a response entity which has another type i.e. ResponseEntity<MyObject>. So I had to make my action signature like so:

public ResponseEntity<?> getResponse(){ . . . }

Unfortunaltely using this signature I always get No converter found for return value of type. But when I make the signature as follows:

public ResponseEntity<StreamingResponseBody> getResponse(){ . . . }

and ignore the ResponseEntity<MyObject> part, it works fine.

Is there any explanation why I can't use ResponseEntity<?> with StreamingResponseBody. By the way I have used this annotation with many custom object before and it has been working fine also.

Thank you.

READ ALSO
how to export the contents of a filtered jTable to a pdfpTable

how to export the contents of a filtered jTable to a pdfpTable

I have a JTable and am using JFilter to filter its contents based on user inputNow i intend to export the contents of the JTable to a PdfPTable using iText library

59
How do we solve error 554 5.5.1 (no valid recipients) when using PHP Swiftmailer?

How do we solve error 554 5.5.1 (no valid recipients) when using PHP Swiftmailer?

When testing out our mail server we stumbled accross an error that prevents us from sending mails via PHP, though regular sending/receiving per Mail-in-a-box works without any problemsWe are running a separate Ubuntu 18

33
Redirect to different page if already opened before

Redirect to different page if already opened before

So I've created a login/signup system and have it if when you go to the homepage straight away it'll redirect you to the login page etcBut I'm trying to create an intro/tutorial stage when you signup and login for the first time

25