<!-- Auto-Wiring "byType" 按属性名称⾃动装配 -->
<bean id="person" class="org.spring.autowring.Person" autowire="byType"/> <bean id="ability" class="org.spring.autowring.Ability">
<property name="skill" value="Java Programming"></property>
</bean>
4、constructor – 在构造函数参数的byType⽅式
<!-- constructor – 在构造函数参数的byType⽅式。 -->
实例化bean的三种方式
<!-- 构造⽅法的参数 -->
<bean id="person" class="org.spring.autowring.Person">
<constructor-arg>
<ref bean="ability"></ref>
</constructor-arg>
</bean>
<bean id="ability" class="org.spring.autowring.Ability">
<property name="skill" value="Java Programming"></property>
</bean>