Back to programming Quizzes

Spring Framework Quiz (Advanced)

This advanced Spring Framework quiz is designed for experienced developers preparing for senior-level interviews and real-world system design challenges. It covers deep Spring internals, edge cases, performance considerations, and production-grade scenarios.

15
Questions
~8
Minutes
8
Min Limit

Try a few sample questions

The question bank contains 45 questions. Your scored round uses up to 15 different questions. These samples are excluded from your round; try each one before opening its answer and explanation.

1. What happens internally when a Spring bean is marked as both @Lazy and singleton?

  1. Bean is never created
  2. Bean is created at context startup
  3. Bean is created on first request
  4. Bean is created per request
Reveal sample answer and explanation

Answer: Bean is created on first request

Lazy singleton beans are instantiated only when first requested.

2. Which Spring component is responsible for resolving method arguments in @Controller methods?

  1. HandlerMapping
  2. HandlerAdapter
  3. ArgumentResolver
  4. ViewResolver
Reveal sample answer and explanation

Answer: ArgumentResolver

HandlerMethodArgumentResolver resolves controller method arguments.

3. What is the main drawback of field injection?

  1. Slower performance
  2. Harder to test and maintain
  3. Memory leaks
  4. Bean creation failure
Reveal sample answer and explanation

Answer: Harder to test and maintain

Field injection makes testing and immutability difficult.