Points To Remember There are three ways to do exception handling in spring boot application. Global Level using - @ControllerAdvice Controller Level using - @ExceptionHandler Method Level using - try/catch Difference between @ExceptionHandler and @ControllerAdvice How to do Exception Handling in Rest Application To demonstrate Exception Handling we will make three Exceptions. BaseException that will be parent of all the Custom Exceptions. CustomException1 that extends Base Exception. CustomException2 that extends Base Exception. We will create the following methods ex1() throws BaseException ex2() throws CustomException1 ex3() throws CustomException2 ex4() throws NullPointerException ex5() throws NumberFormatException and now we will see how we can handle these exceptions using above mentioned ways. Way 1 : Global Exception Handling using @ControllerAdvice Add a class with annotation @ControllerAdvice and @RestContro...