To define a global default exception handler for unhandled exceptions in Spring Boot, you can use a _____ with the highest precedence.

  • @ControllerAdvice
  • @ExceptionHandler
  • @ExceptionHandlerAdvice
  • @ResponseStatus
In Spring Boot, to define a global default exception handler for unhandled exceptions, you use the @ControllerAdvice annotation. This annotation allows you to define a class that can be applied globally to handle exceptions across all controllers. It provides a way to centralize exception handling in your application.
Add your answer
Loading...

Leave a comment

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