02 January 2021

Spring-Scope

  • singleton-The bean instance will be only once and same instance will be returned by the IOC container. Singleton is the default scope of the bean in Spring. Single instance is created and shared among all the beans
  • prototype-The bean instance will be created each time when requested.
  • request- The bean instance will be created per HTTP request.
  • session- The bean instance will be created per HTTP session.
  • globalsession- The bean instance will be created per HTTP global session. It can be used in portlet context only.

No comments:

Post a Comment

Most views on this month