1. 의존관계 주입(Dependency Injection)
- 셋터를 통한 주입(Setter Injection)
<bean class="edu.blz.ioc3.Money" id="money">
<property name="amount">
<value>2000</value>
</property>
</bean>
- 생성자를 통한 주입(Constructor Injection)
<bean class="edu.blz.ioc3.Money" id="money">
<constructor-arg>
<value>2000</value>
</constructor-arg>
</bean>
2. 네임스페이스를 활용한 의존관계 주입
<bean class="edu.blz.ioc3.Money" id="money" p:amount="2000" />
<bean class="edu.blz.ioc3.Money" id="money" c:amount="2000" />