To handle an exception thrown by a specific method in a controller, the _____ annotation is used on a method within that controller.

  • @ControllerResponse
  • @ExceptionHandler
  • @HandleException
  • @ResponseException
To handle an exception thrown by a specific method in a controller, you should use the @ExceptionHandler annotation on a method within that controller. This annotation allows you to specify methods that will handle exceptions thrown by other methods in the same controller class. It's a way to have fine-grained control over how exceptions are handled within a specific controller.
Add your answer
Loading...

Leave a comment

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