In a Spring Boot application, to handle exceptions globally, you can use the _____ annotation on a class.

  • @ControllerAdvice
  • @ExceptionHandler
  • @GlobalExceptionHandler
  • @RestController
In a Spring Boot application, to handle exceptions globally, you can use the @ControllerAdvice annotation on a class. This annotation allows you to define global exception handling methods that can be applied across multiple controllers in your application. It's a powerful mechanism for centralizing exception handling logic.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *