Quiz: Spring Core Questions

Browse questions from Quiz: Spring Core. Each question has options and an explanation.

Questions — Page 1 of 2

  1. What does Inversion of Control mean in Spring?
  2. Spring IoC reduces direct dependency construction with new in application classes.
  3. Which bean scope is the default in Spring?
  4. Prototype is the default Spring bean scope.
  5. Which annotation commonly runs initialization logic after dependency injection?
  6. @PreDestroy is used for cleanup before a bean is destroyed.
  7. Why is constructor injection usually preferred for required dependencies?
  8. Constructor injection hides required dependencies better than field injection.
  9. A service cannot work without its repository and payment client. What injection style gives the clearest fail-fast design?
  10. You need to warm up a cache after Spring injects all dependencies. Where should this setup logic commonly go?

Browse questions

Next page · Quiz overview

Open on QuizMaker