🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Validation and Errors: all 10 questions

Quiz: Validation and Errors · Question 3 of 10

What is @RestControllerAdvice for?

What is @RestControllerAdvice for?

  1. A.Adding new REST endpoints
  2. B.Handling exceptions from all controllers in one place
  3. C.Logging every request
  4. D.Validating database entities
Answer & explanation

Correct answer: Handling exceptions from all controllers in one place

Combined with @ExceptionHandler methods.

Can you get the rest right without peeking?

Take the timed Quiz: Validation and Errors quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →