In this video you will learn about how to handle exception in spring boot application specially when you are building Rest API. This tutorial will guide you one of the way to handle exception using @ControllerAdvice.
@ControllerAdvice is an annotation, to handle the exceptions globally.@ExceptionHandler is an annotation used to handle the specific exceptions.
We have created subclass of ResponseEntityExceptionHandler class which is a class which provides a convient way to centralized exception handling across all @RequestMapping methods through @ExceptionHandler methods.
![](https://i.ytimg.com/vi/l6xYHkMUHco/mqdefault.jpg)