spring(4) spring中集合属性
来源:互联网 发布:淘宝首页装修全屏 编辑:程序博客网 时间:2024/06/05 19:42
spring引用list集合bean,示例如下:
<bean id="person" class="bean.Person"><property name="name" value="Tom"></property><property name="cars"><list><ref bean="car"/><ref bean="car2"/></list></property></bean>
spring引用list集合bean时同样可以内嵌内部bean,示例如下:
<bean id="person" class="bean.Person"><property name="name" value="Tom"></property><property name="cars"><list><ref bean="car"/><ref bean="car2"/><bean class="bean.Car"><property name="name" value="fute"></property><property name="position" value="changan"></property><property name="price" value="100000"></property></bean></list></property></bean>
Spring中map集合设置示例如下:
<bean id="newPerson" class="bean.NewPerson"><property name="name" value="bryant"></property><property name="cars"><map><entry key="AA" value-ref="car"></entry><entry key="BB" value-ref="car2"></entry></map></property></bean>
Spring中配置properties示例如下:
<bean id="dataSource" class="bean.DataSource"><property name="properties"><props><prop key="user">root</prop><prop key="password">1234</prop></props></property></bean>
0 0
- spring(4) spring中集合属性
- Spring中集合合并
- Spring中集合注入
- spring bean xml中集合类属性的输入写法
- Spring中集合的注入
- 【spring框架】spring中集合的注入
- Spring 2.0中集合对象的合并
- Java乔晓松-spring中集合的装配
- Java乔晓松-spring中集合的装配
- 工作记录之Spring学习笔记(4)XML中集合的配置
- Spring 2.0中集合对象注入的复用
- spring中集合 list map的一些操作
- Spring中集合(List,Set,Map)的配置和简单使用(一)
- spring mvc表单中集合类型的参数绑定,含集合下标动态改变
- Hibernate中集合映射的两个属性:cascade和inverse
- Spring 事务合集
- Spring-知识点合集
- C#中集合类
- Spring(2) 注入方式
- spring(3) 引用其他bean
- Codeforces Round #143 (Div. 2) E. Cactus(LCA+无向图缩点)
- Linux C read、write、creat、open等函数应用实例
- android 之FragmentPagerAdapter
- spring(4) spring中集合属性
- Automatic login to SharePoint2010 using Windows user id
- c语言中数组相关问题
- spring
- vim使用技巧---快速匹配
- (正点原子)wifi例程(7.20)
- 《机器学习实战》(一)机器学习基础
- ios面试问题总结
- 拓扑排序