The singleton property of <bean> tells the context whether or not a bean is to be defined as a singleton.
This attribute in bean tag named \"singleton\" if specified true then bean becomes singleton and if set to false then the bean becomes a prototype bean. By default it is set to true.
So, all the beans in spring framework are by default singleton beans.
<bean id=\"bar\" class=\"com.act.Foo\" singleton=\"false\"/>
Prototyped beans are useful when you want the container to give a unique instance of a bean each time it is asked for, but you still want to configure one or more properties of that bean through Spring.
<bean id=\"student\" class=\"com.StudentImpl\"
A new instance of a prototype bean will be created each time getBean() is invoked with the bean\'s name.