Google News
logo
Java Springs - Interview Questions
What are the bean scope types?
Bean scope can be defined as singleton and prototype, request, session, global-session, etc.
 
* Prototype is declared when a new bean instance is required every time.
* Singleton is declared when the same bean instance is used every time.
* Request is used for the HTTP request scope.
* Session is used for the HTTP session scope.
* Global-HTTP session scopes the bean to the global HTTP session.

Syntax : <bean>
Advertisement