Spring集合类型数据的注入
来源:互联网 发布:不想谈恋爱 知乎 编辑:程序博客网 时间:2024/04/28 15:03
<?xml version="1.0" encoding="UTF-8"?><beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:util="http://www.springframework.org/schema/util" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.5.xsd"> <!--list的注入方式1 --> <bean id="Admin" class="com.zmj.web.po.Admin"> <property name="list"> <bean class="org.springframework.beans.factory.config.ListFactoryBean"> <property name="targetListClass"> <value>java.util.ArrayList</value> </property> <property name="sourceList"> <list> <value>001</value> <value>zhou</value> <value>男</value> </list> </property> </bean> </property> </bean> <!--list的注入方式2 --> <bean id="Admin" class="com.zmj.web.po.Admin"> <property name="list"> <util:list list-class="java.util.ArrayList"> <value>001</value> <value>zhou</value> <value>男</value> </util:list> </property> </bean> <!--set的配置方法1 --> <bean id="Admin" class="com.zmj.web.po.Admin"> <property name="set"> <set> <value>1</value> <value>zhou</value> <value>男</value> </set> </property> </bean> <!--set的配置方法2 --> <bean id="Admin" class="com.zmj.web.po.Admin"> <property name="set"> <util:set> <value>001</value> <value>zhou</value> <value>男</value> </util:set> </property> </bean></beans>
0 0
- Spring集合类型数据的注入
- Spring对集合类型的属性注入
- Spring @Autowired 注入集合类型的问题
- Spring @Autowired 注入集合类型的问题
- Spring、基本类型属性和集合类型属性的注入
- Spring集合类型值注入
- spring 注入Date 类型的数据
- spring的注入集合类型的元素小结
- Spring的集合注入
- Spring集合的注入
- Spring集合类型的bean及其注入方法
- 【Spring实战】—— 7 复杂集合类型的注入
- Spring实战—复杂集合类型的注入
- Spring自动类型转换/集合属性注入
- Spring-注入参数详解-[集合类型属性]
- 八.Spring的属性注入-注入对象,复杂的集合类型属性
- Spring (三)注入依赖对象、注入集合类型的属性
- Spring依赖注入对于Date类型数据的处理
- ART运行时Java堆创建过程分析
- android Canvas中的clipRect、drawBitmap
- HTML 4章 课后作业4
- CSS简单代码(上机5)
- easyui datagrid 大数据加载效率慢,优化解决方法
- Spring集合类型数据的注入
- React编程思想Demo解析
- DOM事件探索
- toolbar阴影问题
- 在Qsys上运行程序时出现make elf文件失败的原因
- Android面试分享
- android与html5交互
- 马云:“电商”一词将被淘汰 新型娱乐购物崛起
- leetcode Longest Increasing Subsequence 最长递增子序列