提交 4c74a32a 编写于 作者: [小G]'s avatar [小G] 🚴🏽

使用自动装配byType

上级 07ae2633
......@@ -6,10 +6,8 @@
<bean id="dog11" class="com.ajream.pojo.Dog"/>
<bean id="cat" class="com.ajream.pojo.Cat"/>
<bean id="person" class="com.ajream.pojo.Person" >
<bean id="person" class="com.ajream.pojo.Person" autowire="byType" >
<property name="name" value="张三"/>
<property name="cat" ref="cat"/>
<property name="dog" ref="dog11"/>
</bean>
</beans>
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册