Answers ( 1 )

  1. Exception can be handled in a class annotated with @ControllerAdvice.

    In this class you can write methods which will handle particular type of exception.

    So based on the exception thrown we can write a corresponding handling method in that class and it will be handled accordingly. 

    0 Comment Add Comment/ View

Leave an answer

Logged in as