Spring%20Boot/Spring%20Boot%20-%20Interceptor Sample Test,Sample questions

Question:
Can we use interceptor to add response header  before sending the response to the client ?

1.Yes

2.No

Posted Date:-2020-12-01 07:50:30


Question:
Can we use Interceptor to add the request header before sending  to the controller ?

1.Yes

2.No

Posted Date:-2020-12-01 07:44:46


Question:
Choose methods in Spring boot -Interceptor -HandlerInterceptor interface

1.preHandle()

2.postHandle()

3.afterCompletion()

4.All above three

Posted Date:-2020-12-01 08:05:40


Question:
Interceptor in Spring Boot can perform operations under which situations?

1.Befor sending requets to the controller .

2.Before sending response to the client .

3.Both

4.Only 1

Posted Date:-2020-12-01 07:29:57


Question:
postHandle() method arguments are ?

1.HttpServletRequest request, HttpServletResponse response

2.Object handler, ModelAndView modelAndView

3.both

4.Only 2

Posted Date:-2020-12-01 08:13:45


Question:
return type of  preHandle()

1.boolean

2.void

3.srting

4.Any Object

Posted Date:-2020-12-01 08:14:59


Question:
Spring Boot -Interceptor to work on it .We need create class supported 

1.@Component

2.class should implemented HandlerInterceptor interface.

3.both

4.None

Posted Date:-2020-12-01 07:57:49


Question:
Spring Boot Interceptor -HandlerInterface -preHandle() method 

1.always return true -resopnse to the client .

2.always return true -request to the client .

3.always return false -resopnse to the client .

4.always return true -request to the client .

Posted Date:-2020-12-01 08:10:35


Question:
Spring Boot support Interceptor ?

1.true

2.false

Posted Date:-2020-12-01 07:25:43


Question:
To register a Spring boot Interceptor with InterceptorRegistry  use

1.WebMvcConfigurerAdapter

2.WebSpringBootConfigurerAdapter

3.WebSpringbootAdapter

4.None

Posted Date:-2020-12-01 08:45: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!