Domanda di colloquio di PeopleFluent

What are the spring bean scopes

Risposta di colloquio

Anonimo

8 ago 2025

Singleton Scope: The default scope. A single instance of the bean is created and shared across the entire application context. Prototype Scope: A new instance is created each time a bean is requested. Request Scope: A bean is created once per HTTP request (usually used in web applications). Session Scope: A bean is created once per HTTP session.