Spring入门学习——bean属性配置(二)
来源:互联网 发布:c语言的库函数 编辑:程序博客网 时间:2024/06/13 20:22
对于<set>或<map>集合,如果值相同,子元素将会覆盖父元素。生成的序列后缀将有ABC<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="baseSequenceGenerator" class="com.cgy.springrecipes.sequence.SequenceGenerator"
p:prefix="30" p:suffix="B" p:initial="101000">
<property name="suffixes">
<list>
<value>A</value>
<value>B</value>
</list>
</property>
</bean>
<bean id="sequenceGenerator" parent="baseSequenceGenerator">
<property name="suffixes">
<list merge="true">
<value>A</value>
<value>C</value>
</list>
</property>
</bean>
</beans>
<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="baseSequenceGenerator" class="com.cgy.springrecipes.sequence.SequenceGenerator"
p:prefix="30" p:suffix="B" p:initial="101000">
<property name="suffixes">
<set>
<value>A</value>
<value>B</value>
</set>
</property>
</bean>
<bean id="sequenceGenerator" parent="baseSequenceGenerator">
<property name="suffixes">
<set merge="true">
<value>A</value>
<value>C</value>
</set>
</property>
</bean>
</beans>
- Spring入门学习——bean属性配置(二)
- Spring入门学习——bean属性配置(一)
- Spring入门学习——继承Bean配置
- Spring入门学习——外部化Bean配置
- Spring入门学习——从对象属性中声明Bean
- Spring入门学习——配置文件<beans>属性配置记录
- Spring配置bean属性
- Spring学习二(Bean配置)
- Spring学习笔记(二)Bean配置
- (学习笔记)spring框架入门之配置bean(处理属性中有集合的情况)
- spring—Bean配置
- spring—Bean配置
- Spring入门学习——用XML配置自动装配Bean
- Spring入门——Spring Bean装配之Bean的配置项
- 学习笔记——Spring 中Bean属性的注入
- spring学习(二)Spring 中的 Bean 配置
- Spring的bean属性配置
- spring-bean属性配置解析
- rxjava2 retrofit2 配置
- Spring入门学习——bean属性配置(一)
- 4—IPv6编程*.dll、*.a篇,动态和静…
- 安卓权限配置时出现“Permission is only granted to system apps”
- 研究方向----简洁的美
- Spring入门学习——bean属性配置(二)
- OpenGL 通过glViewport实现2d…
- 【leetcode】Two Sum II
- LinkedList源码阅读
- CentOS给予port端口权限(搭建web…
- Spring入门学习——解决构造函数歧义
- 新浪博客分栏显示功能的测试
- Spring入门学习——指定Bean引用
- 用WebSocket接收服务器数据并控制W…