Spring中property的list属性注入
来源:互联网 发布:金融软件行业 编辑:程序博客网 时间:2024/05/01 01:25
用数值配置spring装配的JavaBean内部的List类型很容易,下面介绍如何用javabean装配JavaBean中的List
Java代码
public class Test {
<?xml version="1.0" encoding="UTF-8"?>
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd">
<bean id="element0" class="com.beantest.Element">
<property name="id" value="1001"/>
<property name="name" value="hello"/>
<property name="url" value="http://www.baidu.com/"/>
</bean>
<bean id="element1" class="com.beantest.Element">
<property name="id" value="1002"/>
<property name="name" value="world"/>
<property name="url" value="http://www.google.com/"/>
</bean>
<bean id="test" class="com.beantest.Test">
<property name="elementList">
<list>
<ref bean="element0" />
<ref bean="element1" />
</list>
</property>
</bean>
</beans>
原文转自:http://blog.csdn.net/xuefeimengli2007/article/details/7948680
- Spring中property的list属性注入
- Spring属性注入Bean的List属性
- spring 注入map,set,list,property
- Spring中使用Map、Set、List、数组、属性集合的注入方法配置文件
- Spring中使用Map、Set、List、数组、属性集合的注入方法配置文件
- Spring中使用Map、Set、List、数组、属性集合的注入方法配置文件
- Spring中使用Map、Set、List、数组、属性集合的注入方法配置文件
- Spring中使用Map、Set、List、数组、属性集合的注入方法配置文件
- Spring中使用Map、Set、List、数组、属性集合的注入方法配置文件
- Spring中使用Map、Set、List、数组、属性集合的注入方法配置文件
- Spring中属性注入的方式
- Spring中Bean的简单属性注入
- Spring中Bean的复杂属性注入
- Spring框架中属性的注入
- 在spring 中如何注入map,set,list,property等参数
- Spring---->属性的注入
- Spring的《XML显式装配bean》之通过属性property注入bean
- spring .xml中bean下的property属性
- 主要垃圾回收算法与Hotspot VM垃圾回收器实现
- 【软考】动态规划之01背包问题
- json与java对象相互转换的两种方法(一)
- 正余弦定理
- 安卓自定义View进阶-Matrix详解
- Spring中property的list属性注入
- nginx反向代理原理和配置讲解
- Struts2学习——1500OGNL3访问集合
- 以stm32的TIM2作为实例一步步配置成为定时器
- 安卓自定义View进阶-Matrix Camera
- R语言--数据抽样的实现
- extern "C" 的用意
- 线程的wait、sleep、join、yield详解
- 全球同服--coc类游戏服务器架构