Bean scope in Spring framework or Spring MVC are scope for a bean managed by Spring IOC container. As we know that Spring is a framework which is based on Dependency Injection and Inversion of Control and provides bean management facilities to Java application. In Spring managed environment bean (Java Classes) are created and wired by Spring framework. Spring allows you to define how those beans will be created and scope of bean is one of those details. This Spring tutorial is next on my earlier post on Spring like how to implement LDAP authentication using Spring security and How to limit number of user session in web application, if you haven’t read them already you may find them useful.
Read more »
In spring framework bean declared in ApplicationContext.xml can reside in five scopes:
1) Singleton (default scope)
2) prototype
3) request
4) session
5) global-session