applicationContext.xml 配置属性和对象ref指向

来源:互联网 发布:centos 6.6网卡配置 编辑:程序博客网 时间:2024/05/22 10:33
<strong><span style="font-size:18px;"><bean id = "helloworld" class="com.huoxin.bean1.HelloWorld"><property name="name" value="123"></property><property name="age" value="123"></property><property name="number" value="123"></property><property name="phone" value="123"></property><property name="tt" ref="cc"></property></bean><bean id ="cc" class="com.huoxin.bean1.TT"><property name="ppp" value = "250"></property></bean></span></strong>


tt是对象,需要自己创建实体类,  ppp是TT尸体的属性


1 1
原创粉丝点击