Bean Scopes in Spring Framework

Standard

Source : Spring Tutorial 11 – Understanding Bean Scopes

Singleton – Only once per Spring container (default) – ApplicationContext

Prototype – New bean created with every request or reference

Web-aware Context Bean Scopes
Request – New bean per servlet request

Session – New bean per session

Global Session – New bean per global HTTP Session (portlet context)

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *

CommentLuv badge

This site uses Akismet to reduce spam. Learn how your comment data is processed.