Spring%20Boot/Spring%20Boot%20-%20Exception%20Handling Sample Test,Sample questions

Question:
 Can we handle exceptions in Spring Boot?

1.Yes

2.No

Posted Date:-2020-11-25 07:19:23


Question:
 Choose annotation, to handle the exceptions globally

1.@GlobalAdvice

2.@ControllerAdvice

3.Both

4.None

Posted Date:-2020-11-25 07:21:17


Question:
 the code to create @ControllerAdvice class to handle the exceptions globally

1.import org.springframework.web.bind.annotation.@GlobalAdvice ; @ControllerAdvice public class ProductExceptionController { }

2.import org.springframework.web.bind.annotation.@@GlobalAdvice ; @GlobalAdice public class ProductExceptionController { }

3.import org.springframework.web.bind.annotation.ControllerAdvice; @ControllerAdvice public class ProductExceptionController { }

4.None

Posted Date:-2020-11-25 07:25:27


Question:
Choose annotation used to handle the specific exceptions and sending the custom responses to the client.

1.@GlobalAdvice

2.@ControllerAdvice

3.@ComponentScan

4.@ExceptionHandler

Posted Date:-2020-11-25 07:22:31


More MCQS

  1. Spring Boot Common Test
  2. Spring Boot - Bootstrapping
  3. Spring Boot - Logging
  4. Spring Boot - Application Properties
  5. Spring Boot - RESTful Web Services
  6. Spring Boot - Exception Handling
  7. Spring Boot - Interceptor
  8. Spring Boot - File Handling
  9. Spring Boot - CORS
  10. Spring Boot - Internationalization
  11. Spring Boot - Scheduling
  12. Spring MCQs
  13. SPRING BOOT MCQ QUESTIONS
  14. Spring MVC MCQ QUESTIONS AND ANSWER
  15. Spring Cloud MCQ QUESTIONS AND ANSWER
  16. Spring WebFlux MCQ OUESTIONS AND ANSWER
Search
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!