-
Notifications
You must be signed in to change notification settings - Fork 37.7k
/
testUtilNamespace.xml
197 lines (167 loc) · 5.87 KB
/
testUtilNamespace.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
<?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-4.1.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-4.1.xsd">
<util:constant id="min" static-field="
java.lang.Integer.
MIN_VALUE
"/>
<util:constant static-field="java.lang.Integer.MAX_VALUE"/>
<util:property-path id="name" path="
configuredBean.
name
"/>
<bean id="testBean" class="org.springframework.tests.sample.beans.TestBean" scope="prototype">
<property name="name">
<util:property-path path="configuredBean.name"/>
</property>
<property name="someProperties">
<util:properties location="classpath:/org/springframework/beans/factory/xml/util.properties"/>
</property>
</bean>
<bean id="constructedTestBean" class="org.springframework.tests.sample.beans.TestBean">
<constructor-arg index="0">
<util:property-path path="configuredBean.name"/>
</constructor-arg>
</bean>
<bean id="configuredBean" class="org.springframework.tests.sample.beans.TestBean">
<property name="name" value="Rob Harrop"/>
</bean>
<util:map id="simpleMap">
<entry key="foo" value="bar"/>
</util:map>
<util:map id="scopedMap" scope="prototype">
<description>My scoped Map</description>
<entry key="foo" value="bar"/>
</util:map>
<util:map id="mapWithRef" map-class="java.util.TreeMap">
<entry key="bean" value-ref="testBean"/>
</util:map>
<util:map id="mapWithTypes" map-class="org.springframework.util.LinkedCaseInsensitiveMap"
key-type="java.lang.String" value-type="org.springframework.tests.sample.beans.TestBean">
<entry key="bean" value-ref="testBean"/>
</util:map>
<util:list id="simpleList">
<value>Rob Harrop</value>
</util:list>
<util:list id="scopedList" scope="prototype">
<description>My scoped List</description>
<value>Rob Harrop</value>
</util:list>
<util:set id="simpleSet">
<value>Rob Harrop</value>
</util:set>
<util:set id="scopedSet" scope="prototype">
<description>My scoped Set</description>
<value>Rob Harrop</value>
</util:set>
<bean id="nestedCollectionsBean" class="org.springframework.tests.sample.beans.TestBean" scope="prototype">
<property name="someList">
<util:list>
<value>foo</value>
</util:list>
</property>
<property name="someSet">
<util:set>
<value>bar</value>
</util:set>
</property>
<property name="someMap">
<util:map>
<entry key="foo">
<util:set>
<value>bar</value>
</util:set>
</entry>
</util:map>
</property>
</bean>
<bean id="nestedShortcutCollections" class="org.springframework.tests.sample.beans.TestBean" scope="prototype">
<property name="stringArray" value="fooStr"/>
<property name="someList" value="foo"/>
<property name="someSet" value="bar"/>
</bean>
<bean id="nestedCustomTagBean" class="org.springframework.tests.sample.beans.TestBean" scope="prototype">
<property name="someList">
<list>
<util:constant static-field="java.lang.Integer.MIN_VALUE"/>
</list>
</property>
<property name="someSet">
<set>
<util:constant static-field="java.lang.Thread$State.NEW"/>
<util:constant static-field="java.lang.Thread.State.RUNNABLE"/>
</set>
</property>
<property name="someMap">
<map>
<entry>
<key><value>min</value></key>
<util:constant static-field="org.springframework.tests.sample.beans.CustomEnum.VALUE_1"/>
</entry>
</map>
</property>
</bean>
<bean id="circularCollectionsBean" class="org.springframework.tests.sample.beans.TestBean">
<property name="someList">
<util:list>
<ref bean="circularCollectionsBean"/>
</util:list>
</property>
<property name="someSet">
<util:set>
<ref bean="circularCollectionsBean"/>
</util:set>
</property>
<property name="someMap">
<util:map>
<entry key="foo" value-ref="circularCollectionsBean"/>
</util:map>
</property>
</bean>
<util:list id="circularList">
<ref bean="circularCollectionBeansBean"/>
</util:list>
<util:set id="circularSet">
<ref bean="circularCollectionBeansBean"/>
</util:set>
<util:map id="circularMap">
<entry key="foo" value-ref="circularCollectionBeansBean"/>
</util:map>
<bean id="circularCollectionBeansBean" class="org.springframework.tests.sample.beans.TestBean">
<property name="someList" ref="circularList"/>
<property name="someSet" ref="circularSet"/>
<property name="someMap" ref="circularMap"/>
</bean>
<util:properties id="myProperties"
location="classpath:/org/springframework/beans/factory/xml/util.properties"/>
<util:properties id="myScopedProperties"
location="classpath:/org/springframework/beans/factory/xml/util.properties,classpath:override.properties"
ignore-resource-not-found="true" scope="prototype"/>
<util:properties id="myLocalProperties">
<prop key="foo2">bar2</prop>
</util:properties>
<util:properties id="myMergedProperties"
location="classpath:/org/springframework/beans/factory/xml/util.properties">
<prop key="foo2">bar2</prop>
</util:properties>
<util:properties id="defaultLocalOverrideProperties"
location="classpath:/org/springframework/beans/factory/xml/util.properties">
<prop key="foo">local</prop>
<prop key="foo2">local2</prop>
</util:properties>
<util:properties id="trueLocalOverrideProperties"
location="classpath:/org/springframework/beans/factory/xml/util.properties"
local-override="true">
<prop key="foo">local</prop>
<prop key="foo2">local2</prop>
</util:properties>
<util:properties id="falseLocalOverrideProperties"
location="classpath:/org/springframework/beans/factory/xml/util.properties"
local-override="false">
<prop key="foo">local</prop>
<prop key="foo2">local2</prop>
</util:properties>
</beans>