1.

What are the bean scopes available in Spring?

Answer»

The Spring Framework has FIVE scope supports. They are:

  • Singleton: The scope of bean definition while using this would be a single instance PER IoC container.
  • Prototype: Here, the scope for a single bean definition can be any NUMBER of object instances.
  • Request: The scope of the bean definition is an HTTP request.
  • Session: Here, the scope of the bean definition is HTTP-session.
  • Global-session: The scope of the bean definition here is a Global HTTP session.

Note: The last three scopes are available only if the users use web-aware APPLICATIONCONTEXT containers.



Discussion

No Comment Found