Spring集合配置
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://www.springframework.org/schema/beans" xmlns:p="http://www.springframework.org/schema/p"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
<bean id="saxophone" class="com.stono.sprtest.Saxophone"></bean>
<bean id="cymbal" class="com.stono.sprtest.Cymbal"></bean>
<bean id="duke" class="com.stono.sprtest.Duke">
<property name="instruments">
<set>
<ref bean="saxophone"/>
<ref bean="saxophone"/>
<ref bean="cymbal"/>
<null/>
</set>
</property>
<property name="name" value="#{saxophone.getName()}" />
<property name="name2" value="#{saxophone.name}" />
<property name="name3" value="#{saxophone.getName()?.toUpperCase()}" />
<property name="name4" value="#{saxophone.name?.toUpperCase()}" />
</bean>
</beans>
Spring集合配置的更多相关文章
- 【转】关于spring集合对象的补充
<span style="font-size:18px;">关于spring集合对象的补充 spring2.0中对集合对象有了改进,新增了一个<util>标 ...
- Spring常用配置示例
Spring 是一款Java平台的开源框架,是为解决企业级应用程序开发的复杂性而创建的,通过良好的分层架构让开发人员能够专注于业务逻辑的开发. Spring框架是一个分层架构,由不同的模块组成,构成s ...
- 简述Spring及配置
简述Spring及配置 Spring最主要的思想就是IoC(Inversionof Control,控制反转),或者成为DI(Dependency Injection,依赖注入) 一.springMV ...
- Spring入门配置(一) - IOC
一.初始命名空间配置 <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="h ...
- Spring 常用配置、Bean
spring模块 Spring-Core: Core包是框架的最基础部分,并提供依赖注入(Dependency Injection)管理Bean容器功能. Spring-Context:(Spring ...
- spring boot系列(五)spring boot 配置spring data jpa (查询方法)
接着上面spring boot系列(四)spring boot 配置spring data jpa 保存修改方法继续做查询的测试: 1 创建UserInfo实体类,代码和https://www.cnb ...
- Spring注解配置和xml配置优缺点比较
Spring注解配置和xml配置优缺点比较 编辑 在昨天发布的文章<spring boot基于注解方式配置datasource>一文中凯哥简单的对xml配置和注解配置进行了比较.然后朋 ...
- Redis篇之操作、lettuce客户端、Spring集成以及Spring Boot配置
Redis篇之操作.lettuce客户端.Spring集成以及Spring Boot配置 目录 一.Redis简介 1.1 数据结构的操作 1.2 重要概念分析 二.Redis客户端 2.1 简介 2 ...
- Spring Boot配置,读取配置文件
Spring Boot配置,读取配置文件 一.配置Spring Boot 1.1 服务器配置 1.2 使用其他Web服务器 1.3 配置启动信息 1.4 配置浏览器显示ico 1.5 Yaml语法 1 ...
随机推荐
- MyEclipse中提示SpringMVC的XML配置文件出错解决方法
手动添加schema文件,方法如下: 1,依次选择:windwos->preferences->myeclipse->files and editors->xml->xm ...
- 如何将CAD文件导入到Protel和PADS中
一. 如何把CAD中的板框图纸导入到Protel中? a. 在CAD中单位设置为“毫米”,并做简单的处理,板框图是有合并还是分解都无所谓,另存为R12(*dxf)格式文件. b. 打开DXP,新建PC ...
- Spring 笔记1
1.在java开发领域,Spring相对于EJB来说是一种轻量级的,非侵入性的Java开发框架,曾经有两本很畅销的书<Expert one-on-one J2EE Design and Deve ...
- [iOS]C语言技术视频-07-函数的定义
下载地址: 链接: http://pan.baidu.com/s/1mgiWSqc 密码: 2q9k
- Hibernate与IBatis的优缺点及可行性分析
以下文章来源于考试大 1.优点 简单: 易于学习,易于使用,通过文档和源代码,可以比较完全的掌握它的设计思路和实现. 实用: 提供了数据映射功能,提供了对底层数据访问的封装(例如ado.net),提供 ...
- 使用myeclipse新建和删除web项目时一定要小心
今天使用myeclipse在非工作空间的路径下新建一个web项目,路径内包含了原有一些web项目,可是我在指定位置时,在那个路径下多写一个子目录的路径,以为myeclipse会 为我默认新建子目录以便 ...
- 单向链表(C#)
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.D ...
- 函数之DisString
DocStringsPython有一个很奇妙的特性,称为 文档字符串 ,它通常被简称为 docstrings .DocStrings是一个重要的工具,由于它帮助你的程序文档更加简单易懂,你应该尽量使用 ...
- [iOS Animation]-CALayer 图层树
图层的树状结构 巨妖有图层,洋葱也有图层,你有吗?我们都有图层 -- 史莱克 Core Animation其实是一个令人误解的命名.你可能认为它只是用来做动画的,但实际上它是从一个叫做Layer Ki ...
- CodeForces 652C Foe Pairs
只要计算每个位置最多能到哪个位置,累加即可,DP从后往前预处理一下每个位置到达的最远位置. 有坑点:输入的时候如果同一个点出发的,需要保存最小值. #include<cstdio> #in ...