简介:
IoC容器可以根据bean的名称、类型或构造方法自动进行注入,称为自动装配。自动装配只针对其他Bean的引用。
(一)按默认方式装配:Default
<!-- TODO:第一种方式:默认装配,也就是手动装配,默认装配就是手动装配 -->
<bean id="studentioc5" class="ioc5.StudentIoc5">
<property name="name" value="javahello"/>
</bean>
<bean id="customerioc5" class="ioc5.CustomerIoc5" autowire="default">
<property name="studentIoc5" ref=