Skills101
← All practice quizzes

Quiz: Spring Core and DI

5 questionsNo time limitPass: 60%+10 XP on first pass

The idea behind all of Spring: the IoC container creates your objects (beans) and injects what they need. Constructor injection, @Component and @Service, @Primary and @Qualifier, @Bean methods, scopes and the bean lifecycle.

Log in to take the quiz

Free account · see your score, answers and explanations, earn XP

  1. Question 1

    What does "Inversion of Control" mean in Spring?

  2. Question 2

    Two beans implement Notifier and one is marked @Primary. A constructor asks for a plain Notifier. Which is injected?

  3. Question 3

    Which injection style is recommended?

  4. Question 4

    What is the default scope of a Spring bean?

  5. Question 5

    Which annotation is NOT a specialisation of @Component?