Spring Boot: ControllerAdvice

A place to factor out common ExceptionHandler, ModelAttribute and InitBinder code across multiple controllers

If you want certain attributes of your Model to be present in every controller method that processes a web request, a class annotated with @ControllerAdvice may be helpful.

Related topics: