29 December 2020

Exception handling

  • Controller based - Define exception handler methods in the controller class. Annotate these methods using @ExceptionHandler.
  • Global Exception handler -  @ControllerAdvice annotation that can be used with any class to define our global exception handler.
  • HandlerExceptionResolver - This interface can be used to create global exception handler.

No comments:

Post a Comment

Most views on this month