Spring / Spring interview questions
What is the purpose of @ControllerAdvice Annotation?
@ControllerAdvice annotation manages the exceptions in Spring Boot Application.It is an interceptor of exceptions thrown by methods annotated with @RequestMapping.
@ControllerAdvice is a specialization of the @Component annotation that allows to handle exceptions across the entire application in one global handling component.
ResponseEntityExceptionHandler is the base class that provides centralized exception handling.
More Related questions...