You can specify the scope for your components in Spring MVC. The default scope is singleton, which means that there will be only one instance of the component in the context. Every request for this component will be served with the same instance. The other scopes are as follows:
- Prototype: Each request for the component is served with a new instance of that class.
- Request: Valid for web applications. Single instance of a component class created for each HTTP request.
- Session: Single instance of a component class created for each HTTP session. Used in web applications.
- Global session: Single instance of a component class created for the global HTTP session. Used in portlet applications.
- Application: Single instance of a component ...