- Scope refers to the life cycle of a bean .
-How long does the bean will alive
-How the bean will share
-How many instances will created
By default bean scope is singleton.
Singleton: Spring container will create single instance .All request for the bean will return a shared reference for that bean.
-Prototype:Create new reference and return it .
No comments:
Post a Comment