Right now I need my controller to return 2 different type of Object based on business logic , So my question is should i use
ResponseEntity <?>
or should I use:
ResponseEntity <Object>
What are the difference between this return types and why should I use them?
Does it make any cahnges to JSON returned by Spring controller?
I'm asking about return types not input parameter.
I use Spring MVC 4.