빈의 범위
빈(Bean)의 범위
싱글톤(SingleTon)
- 컨테이너에서 생성된 Bean객체의 경우 동일한 타입에서는 한개만생성, 즉 getBean으로 호출시 동일한 객체가 반환
프로토타입(ProtoType)
- 싱글톤 범위와는 다르게 호출 할때마다 새로운 객체생성
<bean id="" class="" scope="prototype"> <constructor-arg ref="injectionBean"/> <property name="injectionBean" ref="injectionBean"/> </bean>