Returning ResponseEntity<T>

Return a ResponseEntity from a controller method to choose the status code, for example 404 when a category isn't found and 500 when something fails.

Updated

Cheat sheet: Returning ResponseEntity<T>
Category
Spring Boot
Level
Journeyman
Tags
rest-api, Spring Boot