Closed bglamadrid closed 3 years ago
It is a cleaner practice to annotate with @ResponseStatus and only use ResponseEntity for uncommon status codes that require a bit more complex preparation, such as the 301 SEE_OTHER
code that should include a Location
header with a valid URI.
Using ResponseEntity is a great way to write controllers down as if they were API documentation, with declared HTTP response codes.