The
Spring Framework supports following five scopes, three of which are available
only if you use a webaware ApplicationContext.
singleton: This scopes the bean
definition to a sing le instance per Spring IoC container.
prototype: This scopes a single bean
definition to have any number of object instances.
request: This scopes a bean
definition to an HT T P request. Only valid in the context of a web-aware Spring
ApplicationContext.
session: This scopes a bean
definition to an HT T P session. Only valid in the context of a web-aware Spring
ApplicationContext.
global-session: This scopes a
bean definition to a global HT T P session. Only valid in the context of a web-aware Spring
ApplicationContext.
Read: Defining bean scope
No comments:
Post a Comment