Bird
0
0

What is the default scope of a Spring Boot bean if no @Scope annotation is specified?

easy📝 Conceptual Q1 of 15
Spring Boot - Spring Annotations
What is the default scope of a Spring Boot bean if no @Scope annotation is specified?
ASingleton
BPrototype
CRequest
DSession
Step-by-Step Solution
Solution:
  1. Step 1: Understand default bean scope in Spring Boot

    By default, Spring beans are created as singletons, meaning one instance per Spring container.
  2. Step 2: Recall the effect of missing @Scope annotation

    If no @Scope is specified, the bean remains singleton scoped.
  3. Final Answer:

    Singleton -> Option A
  4. Quick Check:

    Default scope = Singleton [OK]
Quick Trick: Default bean scope is singleton unless specified otherwise [OK]
Common Mistakes:
  • Assuming prototype is default
  • Confusing request scope as default
  • Thinking session scope is default

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Spring Boot Quizzes