S

Satya • 3.38K Points
Extraordinary

Q. Which annotation is used for global exception handling in Spring MVC?

  • (A) @ExceptionHandler
  • (B) @ControllerAdvice
  • (C) @Service
  • (D) @Repository
  • Correct Answer - Option(B)
  • Views: 1
  • Filed under category Spring MVC
  • Hashtags:

Explanation by: Satya
@ControllerAdvice enables centralized exception handling across multiple controllers.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.