依赖注入多种注入方式
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd">
<bean id="address" class="com.liu.pojo.Address">
<property name="address" value="河北"/>
</bean>
<bean id="student" class="com.liu.pojo.Strudent">
<property name="name" value="刘玉星"/>
<property name="address" ref="address" />
<property name="books">
<array>
<value>红楼梦</value>
<value>三国</value>
<value>水浒传</value>
<value>西游记</value>
</array>
</property>
<property name="hobbys">
<list>
<value>听歌</value>
<value>打游戏</value>
<value>看电影</value>
</list>
</property>
<property name="card">
<map>
<entry key="身份证" value="122344"/>
<entry key="银行卡" value="56789"/>
</map>
</property>
<property name="games">
<set>
<value>LOL</value>
<value>COC</value>
<value>BOB</value>
</set>
</property>
<property name="info">
<props>
<prop key="学号">2020</prop>
<prop key="性别">男</prop>
</props>
</property>
</bean>
</beans>