I was wondering how to correctly implement a Spring Controller which is supposed to serve as a REST Service. Especially I want to try and make the interface as RESTful as po
you can use @ExceptionHandler with @ControllerAdvice check this link
@ExceptionHandler
@ControllerAdvice