Question - How many bean scopes are supported by Spring?
Answer -
The Spring Framework supports five scopes. They are:
- Singleton: This provides scope for the bean definition to single instance per Spring IoC container.
- Prototype: This provides scope for a single bean definition to have any number of object instances.
- Request: This provides scope for a bean definition to an HTTP-request.
- Session: This provides scope for a bean definition to an HTTP-session.
- Global-session: This provides scope for a bean definition to an Global HTTP-session.