spring in action 2.0读书笔记(二)
Bean scope
singleton:Scopes the bean definition to a single instance per Spring container (default).
prototype:Allows a bean to be instantiated any number of times (once per use).
request:Scopes a bean definition to an HTTP request. Only valid when used with a webcapable Spring context (such as with Spring MVC).
session:Scopes a bean definition to an HTTP session. Only valid when used with a webcapable Spring context (such as with Spring MVC).
global-session:Scopes a bean definition to a global HTTP session. Only valid when used in a portlet context.
<bean id="theStage" /><bean id="kenny" destroy-method="cleanInstrument"><property name="song" value="Jingle Bells" /><property name="instrument" ref="saxophone" /></bean>