beginnerSpring Fundamentals

What is the default scope of a Spring Bean, and what other scopes are available?

The default scope is singleton — the container creates exactly one shared instance of the bean for the entire application context, and every injection point receives that same instance. Other scopes include prototype (a new instance every time the bean is requested), and web-specific scopes like request and session that tie a bean's lifetime to an HTTP request or session.

This is a Pro question

Sign in, then upgrade to Pro or Power to unlock this question and the full Interview Prep bank.

What is the default scope of a Spring Bean, and what other scopes are available?

Next Step

Continue to When should you NOT use Virtual Threads — what are their limitations?← Back to all Spring Boot & Microservices questions