Question 1: CORE SPRING BOOT - Purpose of @ControllerAdvice
What is the main purpose of the @ControllerAdvice annotation in Spring Boot?
Question 2: CORE SPRING BOOT - Purpose of @ExceptionHandler
Which statement correctly describes @ExceptionHandler in Spring Boot?
Question 3: CORE SPRING BOOT - Code Snippet (Global Exception Handler)
What will happen when a NullPointerException is thrown in any controller in this code?
Question 4: CORE SPRING BOOT - Local vs Global Exception Handling
Which statement is correct regarding local vs global exception handling in Spring Boot?
Question 5: CORE SPRING BOOT - Code Snippet (Multiple Exceptions)
What does the following code achieve?
Question 6: CORE SPRING BOOT - ResponseEntity in Exception Handling
Why is ResponseEntity commonly used in exception handlers?
Question 7: CORE SPRING BOOT - Code Snippet (@RestControllerAdvice)
What is the effect of using @RestControllerAdvice instead of @ControllerAdvice?
Question 8: CORE SPRING BOOT - Code Snippet (Default Exception Handling)
What will happen if an unhandled exception occurs in a Spring Boot controller and no @ControllerAdvice is defined?
Question 9: CORE SPRING BOOT - Best Practices in Exception Handling
Which of the following is a best practice for exception handling in Spring Boot?
Question 10: CORE SPRING BOOT - Custom Error Attributes
How can you customize the structure of default error responses in Spring Boot?