-717169557.cache 38 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077
  1. <?xml version="1.0" encoding="UTF-8" standalone="no"?>
  2. <xsd:schema xmlns="http://www.springframework.org/schema/beans"
  3. xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  4. targetNamespace="http://www.springframework.org/schema/beans">
  5. <xsd:import namespace="http://www.w3.org/XML/1998/namespace"/>
  6. <xsd:annotation>
  7. <xsd:documentation><![CDATA[
  8. Spring XML Beans Schema, version 2.0
  9. Authors: Rob Harrop, Juergen Hoeller
  10. This defines a simple and consistent way of creating a namespace
  11. of JavaBeans objects, managed by a Spring BeanFactory, read by
  12. XmlBeanDefinitionReader (with DefaultBeanDefinitionDocumentReader).
  13. This document type is used by most Spring functionality, including
  14. web application contexts, which are based on bean factories.
  15. Each "bean" element in this document defines a JavaBean.
  16. Typically the bean class is specified, along with JavaBean properties
  17. and/or constructor arguments.
  18. A bean instance can be a "singleton" (shared instance) or a "prototype"
  19. (independent instance). Further scopes can be provided by extended
  20. bean factories, for example in a web environment.
  21. References among beans are supported, that is, setting a JavaBean property
  22. or a constructor argument to refer to another bean in the same factory
  23. (or an ancestor factory).
  24. As alternative to bean references, "inner bean definitions" can be used.
  25. Singleton flags of such inner bean definitions are effectively ignored:
  26. inner beans are typically anonymous prototypes.
  27. There is also support for lists, sets, maps, and java.util.Properties
  28. as bean property types or constructor argument types.
  29. ]]></xsd:documentation>
  30. </xsd:annotation>
  31. <!-- base types -->
  32. <xsd:complexType name="identifiedType" abstract="true">
  33. <xsd:annotation>
  34. <xsd:documentation><![CDATA[
  35. The unique identifier for a bean. The scope of the identifier
  36. is the enclosing bean factory.
  37. ]]></xsd:documentation>
  38. </xsd:annotation>
  39. <xsd:attribute name="id" type="xsd:ID">
  40. <xsd:annotation>
  41. <xsd:documentation><![CDATA[
  42. The unique identifier for a bean.
  43. ]]></xsd:documentation>
  44. </xsd:annotation>
  45. </xsd:attribute>
  46. </xsd:complexType>
  47. <!-- Top-level <beans> tag -->
  48. <xsd:element name="beans">
  49. <xsd:annotation>
  50. <xsd:documentation><![CDATA[
  51. The top level (typically root) element. Allows the definition
  52. of default values for all nested bean definitions.
  53. ]]></xsd:documentation>
  54. </xsd:annotation>
  55. <xsd:complexType>
  56. <xsd:sequence>
  57. <xsd:element ref="description" minOccurs="0"/>
  58. <xsd:choice minOccurs="0" maxOccurs="unbounded">
  59. <xsd:element ref="import"/>
  60. <xsd:element ref="alias"/>
  61. <xsd:element ref="bean"/>
  62. <xsd:any namespace="##other" processContents="strict" minOccurs="0" maxOccurs="unbounded"/>
  63. </xsd:choice>
  64. </xsd:sequence>
  65. <xsd:attribute name="default-lazy-init" default="false" type="xsd:boolean">
  66. <xsd:annotation>
  67. <xsd:documentation><![CDATA[
  68. The default 'lazy-init' value; see the documentation for the
  69. 'lazy-init' attribute of the '<bean>' element.
  70. ]]></xsd:documentation>
  71. </xsd:annotation>
  72. </xsd:attribute>
  73. <xsd:attribute name="default-merge" default="false" type="xsd:boolean">
  74. <xsd:annotation>
  75. <xsd:documentation><![CDATA[
  76. The default 'merge' value; see the documentation for the
  77. 'merge' attribute of the various collection elements.
  78. ]]></xsd:documentation>
  79. </xsd:annotation>
  80. </xsd:attribute>
  81. <xsd:attribute name="default-autowire" default="no">
  82. <xsd:annotation>
  83. <xsd:documentation><![CDATA[
  84. The default 'autowire' value; see the documentation for the
  85. 'autowire' attribute of the '<bean>' element.
  86. ]]></xsd:documentation>
  87. </xsd:annotation>
  88. <xsd:simpleType>
  89. <xsd:restriction base="xsd:NMTOKEN">
  90. <xsd:enumeration value="no"/>
  91. <xsd:enumeration value="byName"/>
  92. <xsd:enumeration value="byType"/>
  93. <xsd:enumeration value="constructor"/>
  94. <xsd:enumeration value="autodetect"/>
  95. </xsd:restriction>
  96. </xsd:simpleType>
  97. </xsd:attribute>
  98. <xsd:attribute name="default-dependency-check" default="none">
  99. <xsd:annotation>
  100. <xsd:documentation><![CDATA[
  101. The default 'dependency-check' value; see the documentation for the
  102. 'dependency-check' attribute of the '<bean>' element.
  103. ]]></xsd:documentation>
  104. </xsd:annotation>
  105. <xsd:simpleType>
  106. <xsd:restriction base="xsd:NMTOKEN">
  107. <xsd:enumeration value="none"/>
  108. <xsd:enumeration value="simple"/>
  109. <xsd:enumeration value="objects"/>
  110. <xsd:enumeration value="all"/>
  111. </xsd:restriction>
  112. </xsd:simpleType>
  113. </xsd:attribute>
  114. <xsd:attribute name="default-init-method" type="xsd:string">
  115. <xsd:annotation>
  116. <xsd:documentation><![CDATA[
  117. The default 'init-method' value; see the documentation for the
  118. 'init-method' attribute of the '<bean>' element.
  119. ]]></xsd:documentation>
  120. </xsd:annotation>
  121. </xsd:attribute>
  122. <xsd:attribute name="default-destroy-method" type="xsd:string">
  123. <xsd:annotation>
  124. <xsd:documentation><![CDATA[
  125. The default 'destroy-method' value; see the documentation for the
  126. 'destroy-method' attribute of the '<bean>' element.
  127. ]]></xsd:documentation>
  128. </xsd:annotation>
  129. </xsd:attribute>
  130. </xsd:complexType>
  131. </xsd:element>
  132. <xsd:element name="description">
  133. <xsd:annotation>
  134. <xsd:documentation><![CDATA[
  135. Contains informative text describing the purpose of the enclosing element.
  136. Used primarily for user documentation of XML bean definition documents.
  137. ]]></xsd:documentation>
  138. </xsd:annotation>
  139. <xsd:complexType mixed="true">
  140. <xsd:choice minOccurs="0" maxOccurs="unbounded"/>
  141. </xsd:complexType>
  142. </xsd:element>
  143. <xsd:element name="import">
  144. <xsd:annotation>
  145. <xsd:documentation source="java:org.springframework.core.io.Resource"><![CDATA[
  146. Specifies an XML bean definition resource to import.
  147. ]]></xsd:documentation>
  148. </xsd:annotation>
  149. <xsd:complexType>
  150. <xsd:complexContent>
  151. <xsd:restriction base="xsd:anyType">
  152. <xsd:attribute name="resource" type="xsd:string" use="required">
  153. <xsd:annotation>
  154. <xsd:documentation><![CDATA[
  155. The relative resource location of the XML (bean definition) file to import,
  156. for example "myImport.xml" or "includes/myImport.xml" or "../myImport.xml".
  157. ]]></xsd:documentation>
  158. </xsd:annotation>
  159. </xsd:attribute>
  160. </xsd:restriction>
  161. </xsd:complexContent>
  162. </xsd:complexType>
  163. </xsd:element>
  164. <xsd:element name="alias">
  165. <xsd:annotation>
  166. <xsd:documentation><![CDATA[
  167. Defines an alias for a bean (which can reside in a different definition
  168. resource).
  169. ]]></xsd:documentation>
  170. </xsd:annotation>
  171. <xsd:complexType>
  172. <xsd:complexContent>
  173. <xsd:restriction base="xsd:anyType">
  174. <xsd:attribute name="name" type="xsd:string" use="required">
  175. <xsd:annotation>
  176. <xsd:documentation><![CDATA[
  177. The name of the bean to define an alias for.
  178. ]]></xsd:documentation>
  179. </xsd:annotation>
  180. </xsd:attribute>
  181. <xsd:attribute name="alias" type="xsd:string" use="required">
  182. <xsd:annotation>
  183. <xsd:documentation><![CDATA[
  184. The alias name to define for the bean.
  185. ]]></xsd:documentation>
  186. </xsd:annotation>
  187. </xsd:attribute>
  188. </xsd:restriction>
  189. </xsd:complexContent>
  190. </xsd:complexType>
  191. </xsd:element>
  192. <xsd:group name="beanElements">
  193. <xsd:sequence>
  194. <xsd:element ref="description" minOccurs="0"/>
  195. <xsd:choice minOccurs="0" maxOccurs="unbounded">
  196. <xsd:element ref="meta"/>
  197. <xsd:element ref="constructor-arg"/>
  198. <xsd:element ref="property"/>
  199. <xsd:element ref="lookup-method"/>
  200. <xsd:element ref="replaced-method"/>
  201. <xsd:any namespace="##other" processContents="strict" minOccurs="0" maxOccurs="unbounded"/>
  202. </xsd:choice>
  203. </xsd:sequence>
  204. </xsd:group>
  205. <xsd:attributeGroup name="beanAttributes">
  206. <xsd:attribute name="name" type="xsd:string">
  207. <xsd:annotation>
  208. <xsd:documentation><![CDATA[
  209. Can be used to create one or more aliases illegal in an (XML) id.
  210. Multiple aliases can be separated by any number of spaces, commas,
  211. or semi-colons (or indeed any mixture of the three).
  212. ]]></xsd:documentation>
  213. </xsd:annotation>
  214. </xsd:attribute>
  215. <xsd:attribute name="class" type="xsd:string">
  216. <xsd:annotation>
  217. <xsd:documentation source="java:java.lang.Class"><![CDATA[
  218. The fully qualified name of the bean's class, except if it serves only
  219. as a parent definition for child bean definitions.
  220. ]]></xsd:documentation>
  221. </xsd:annotation>
  222. </xsd:attribute>
  223. <xsd:attribute name="parent" type="xsd:string">
  224. <xsd:annotation>
  225. <xsd:documentation><![CDATA[
  226. The name of the parent bean definition.
  227. Will use the bean class of the parent if none is specified, but can
  228. also override it. In the latter case, the child bean class must be
  229. compatible with the parent, i.e. accept the parent's property values
  230. and constructor argument values, if any.
  231. A child bean definition will inherit constructor argument values,
  232. property values and method overrides from the parent, with the option
  233. to add new values. If init method, destroy method, factory bean and/or
  234. factory method are specified, they will override the corresponding
  235. parent settings.
  236. The remaining settings will always be taken from the child definition:
  237. depends on, autowire mode, dependency check, scope, lazy init.
  238. ]]></xsd:documentation>
  239. </xsd:annotation>
  240. </xsd:attribute>
  241. <xsd:attribute name="scope" type="xsd:string">
  242. <xsd:annotation>
  243. <xsd:documentation><![CDATA[
  244. The scope of this bean: typically "singleton" (one shared instance,
  245. which will be returned by all calls to getBean with the given id), or
  246. "prototype" (independent instance resulting from each call to getBean).
  247. Default is "singleton".
  248. Singletons are most commonly used, and are ideal for multi-threaded
  249. service objects. Further scopes, such as "request" or "session", might
  250. be supported by extended bean factories (e.g. in a web environment).
  251. Note: This attribute will not be inherited by child bean definitions.
  252. Hence, it needs to be specified per concrete bean definition.
  253. Inner bean definitions inherit the singleton status of their containing
  254. bean definition, unless explicitly specified: The inner bean will be a
  255. singleton if the containing bean is a singleton, and a prototype if
  256. the containing bean has any other scope.
  257. ]]></xsd:documentation>
  258. </xsd:annotation>
  259. </xsd:attribute>
  260. <xsd:attribute name="abstract" type="xsd:boolean">
  261. <xsd:annotation>
  262. <xsd:documentation><![CDATA[
  263. Is this bean "abstract", that is, not meant to be instantiated itself
  264. but rather just serving as parent for concrete child bean definitions?
  265. The default is "false". Specify "true" to tell the bean factory to not
  266. try to instantiate that particular bean in any case.
  267. Note: This attribute will not be inherited by child bean definitions.
  268. Hence, it needs to be specified per abstract bean definition.
  269. ]]></xsd:documentation>
  270. </xsd:annotation>
  271. </xsd:attribute>
  272. <xsd:attribute name="lazy-init" default="default" type="defaultable-boolean">
  273. <xsd:annotation>
  274. <xsd:documentation><![CDATA[
  275. Indicates whether or not this bean is to be lazily initialized.
  276. If false, it will be instantiated on startup by bean factories
  277. that perform eager initialization of singletons. The default is
  278. "false".
  279. Note: This attribute will not be inherited by child bean definitions.
  280. Hence, it needs to be specified per concrete bean definition.
  281. ]]></xsd:documentation>
  282. </xsd:annotation>
  283. </xsd:attribute>
  284. <xsd:attribute name="autowire" default="default">
  285. <xsd:annotation>
  286. <xsd:documentation><![CDATA[
  287. Controls whether bean properties are "autowired".
  288. This is an automagical process in which bean references don't need
  289. to be coded explicitly in the XML bean definition file, but rather the
  290. Spring container works out dependencies.
  291. There are 5 modes:
  292. 1. "no"
  293. The traditional Spring default. No automagical wiring. Bean references
  294. must be defined in the XML file via the <ref/> element (or "ref"
  295. attribute). We recommend this in most cases as it makes documentation
  296. more explicit.
  297. 2. "byName"
  298. Autowiring by property name. If a bean of class Cat exposes a "dog"
  299. property, Spring will try to set this to the value of the bean "dog"
  300. in the current container. If there is no matching bean by name, nothing
  301. special happens; use dependency-check="objects" to raise an error in
  302. that case.
  303. 3. "byType"
  304. Autowiring if there is exactly one bean of the property type in the
  305. container. If there is more than one, a fatal error is raised, and
  306. you cannot use byType autowiring for that bean. If there is none,
  307. nothing special happens; use dependency-check="objects" to raise an
  308. error in that case.
  309. 4. "constructor"
  310. Analogous to "byType" for constructor arguments. If there is not exactly
  311. one bean of the constructor argument type in the bean factory, a fatal
  312. error is raised.
  313. 5. "autodetect"
  314. Chooses "constructor" or "byType" through introspection of the bean
  315. class. If a default constructor is found, "byType" gets applied.
  316. Note that explicit dependencies, i.e. "property" and "constructor-arg"
  317. elements, always override autowiring. Autowire behavior can be combined
  318. with dependency checking, which will be performed after all autowiring
  319. has been completed.
  320. Note: This attribute will not be inherited by child bean definitions.
  321. Hence, it needs to be specified per concrete bean definition.
  322. ]]></xsd:documentation>
  323. </xsd:annotation>
  324. <xsd:simpleType>
  325. <xsd:restriction base="xsd:NMTOKEN">
  326. <xsd:enumeration value="default"/>
  327. <xsd:enumeration value="no"/>
  328. <xsd:enumeration value="byName"/>
  329. <xsd:enumeration value="byType"/>
  330. <xsd:enumeration value="constructor"/>
  331. <xsd:enumeration value="autodetect"/>
  332. </xsd:restriction>
  333. </xsd:simpleType>
  334. </xsd:attribute>
  335. <xsd:attribute name="dependency-check" default="default">
  336. <xsd:annotation>
  337. <xsd:documentation><![CDATA[
  338. Controls whether or not to check whether all of this
  339. bean's dependencies, expressed in its properties, are satisfied.
  340. The default is to perform no dependency checking.
  341. "simple" type dependency checking includes primitives and String;
  342. "objects" includes collaborators (other beans in the factory);
  343. "all" includes both types of dependency checking.
  344. Note: This attribute will not be inherited by child bean definitions.
  345. Hence, it needs to be specified per concrete bean definition.
  346. ]]></xsd:documentation>
  347. </xsd:annotation>
  348. <xsd:simpleType>
  349. <xsd:restriction base="xsd:NMTOKEN">
  350. <xsd:enumeration value="default"/>
  351. <xsd:enumeration value="none"/>
  352. <xsd:enumeration value="simple"/>
  353. <xsd:enumeration value="objects"/>
  354. <xsd:enumeration value="all"/>
  355. </xsd:restriction>
  356. </xsd:simpleType>
  357. </xsd:attribute>
  358. <xsd:attribute name="depends-on" type="xsd:string">
  359. <xsd:annotation>
  360. <xsd:documentation><![CDATA[
  361. The names of the beans that this bean depends on being initialized.
  362. The bean factory will guarantee that these beans get initialized
  363. before this bean.
  364. Note that dependencies are normally expressed through bean properties
  365. or constructor arguments. This property should just be necessary for
  366. other kinds of dependencies like statics (*ugh*) or database preparation
  367. on startup.
  368. Note: This attribute will not be inherited by child bean definitions.
  369. Hence, it needs to be specified per concrete bean definition.
  370. ]]></xsd:documentation>
  371. </xsd:annotation>
  372. </xsd:attribute>
  373. <xsd:attribute name="autowire-candidate" type="xsd:boolean">
  374. <xsd:annotation>
  375. <xsd:documentation><![CDATA[
  376. Indicates whether or not this bean should be considered when looking
  377. for matching candidates to satisfy another bean's autowiring requirements.
  378. Note that this does not affect explicit references by name, which will get
  379. resolved even if the specified bean is not marked as an autowire candidate.
  380. ]]></xsd:documentation>
  381. </xsd:annotation>
  382. </xsd:attribute>
  383. <xsd:attribute name="init-method" type="xsd:string">
  384. <xsd:annotation>
  385. <xsd:documentation><![CDATA[
  386. The name of the custom initialization method to invoke after setting
  387. bean properties. The method must have no arguments, but may throw any
  388. exception.
  389. ]]></xsd:documentation>
  390. </xsd:annotation>
  391. </xsd:attribute>
  392. <xsd:attribute name="destroy-method" type="xsd:string">
  393. <xsd:annotation>
  394. <xsd:documentation><![CDATA[
  395. The name of the custom destroy method to invoke on bean factory
  396. shutdown. The method must have no arguments, but may throw any
  397. exception.
  398. Note: Only invoked on beans whose lifecycle is under the full
  399. control of the factory - which is always the case for singletons,
  400. but not guaranteed for any other scope.
  401. ]]></xsd:documentation>
  402. </xsd:annotation>
  403. </xsd:attribute>
  404. <xsd:attribute name="factory-method" type="xsd:string">
  405. <xsd:annotation>
  406. <xsd:documentation><![CDATA[
  407. The name of a factory method to use to create this object. Use
  408. constructor-arg elements to specify arguments to the factory method,
  409. if it takes arguments. Autowiring does not apply to factory methods.
  410. If the "class" attribute is present, the factory method will be a static
  411. method on the class specified by the "class" attribute on this bean
  412. definition. Often this will be the same class as that of the constructed
  413. object - for example, when the factory method is used as an alternative
  414. to a constructor. However, it may be on a different class. In that case,
  415. the created object will *not* be of the class specified in the "class"
  416. attribute. This is analogous to FactoryBean behavior.
  417. If the "factory-bean" attribute is present, the "class" attribute is not
  418. used, and the factory method will be an instance method on the object
  419. returned from a getBean call with the specified bean name. The factory
  420. bean may be defined as a singleton or a prototype.
  421. The factory method can have any number of arguments. Autowiring is not
  422. supported. Use indexed constructor-arg elements in conjunction with the
  423. factory-method attribute.
  424. Setter Injection can be used in conjunction with a factory method.
  425. Method Injection cannot, as the factory method returns an instance,
  426. which will be used when the container creates the bean.
  427. ]]></xsd:documentation>
  428. </xsd:annotation>
  429. </xsd:attribute>
  430. <xsd:attribute name="factory-bean" type="xsd:string">
  431. <xsd:annotation>
  432. <xsd:documentation><![CDATA[
  433. Alternative to class attribute for factory-method usage.
  434. If this is specified, no class attribute should be used.
  435. This must be set to the name of a bean in the current or
  436. ancestor factories that contains the relevant factory method.
  437. This allows the factory itself to be configured using Dependency
  438. Injection, and an instance (rather than static) method to be used.
  439. ]]></xsd:documentation>
  440. </xsd:annotation>
  441. </xsd:attribute>
  442. <xsd:anyAttribute namespace="##other" processContents="lax"/>
  443. </xsd:attributeGroup>
  444. <xsd:element name="meta" type="metaType">
  445. <xsd:annotation>
  446. <xsd:documentation><![CDATA[
  447. Arbitrary metadata attached to a bean definition.
  448. ]]></xsd:documentation>
  449. </xsd:annotation>
  450. </xsd:element>
  451. <xsd:complexType name="metaType">
  452. <xsd:attribute name="key" type="xsd:string" use="required">
  453. <xsd:annotation>
  454. <xsd:documentation><![CDATA[
  455. The key name of the metadata attribute being defined.
  456. ]]></xsd:documentation>
  457. </xsd:annotation>
  458. </xsd:attribute>
  459. <xsd:attribute name="value" type="xsd:string" use="required">
  460. <xsd:annotation>
  461. <xsd:documentation><![CDATA[
  462. The value of the metadata attribute being defined (as a simple String).
  463. ]]></xsd:documentation>
  464. </xsd:annotation>
  465. </xsd:attribute>
  466. </xsd:complexType>
  467. <xsd:element name="bean">
  468. <xsd:annotation>
  469. <xsd:documentation source="java:org.springframework.beans.factory.config.BeanDefinition"><![CDATA[
  470. Defines a single (usually named) bean.
  471. A bean definition may contain nested tags for constructor arguments,
  472. property values, lookup methods, and replaced methods. Mixing constructor
  473. injection and setter injection on the same bean is explicitly supported.
  474. ]]></xsd:documentation>
  475. </xsd:annotation>
  476. <xsd:complexType>
  477. <xsd:complexContent>
  478. <xsd:extension base="identifiedType">
  479. <xsd:group ref="beanElements"/>
  480. <xsd:attributeGroup ref="beanAttributes"/>
  481. </xsd:extension>
  482. </xsd:complexContent>
  483. </xsd:complexType>
  484. </xsd:element>
  485. <xsd:element name="constructor-arg">
  486. <xsd:annotation>
  487. <xsd:documentation source="java:org.springframework.beans.factory.config.ConstructorArgumentValues">
  488. <![CDATA[
  489. Bean definitions can specify zero or more constructor arguments.
  490. This is an alternative to "autowire constructor".
  491. Arguments correspond to either a specific index of the constructor
  492. argument list or are supposed to be matched generically by type.
  493. Note: A single generic argument value will just be used once, rather
  494. than potentially matched multiple times (as of Spring 1.1).
  495. constructor-arg elements are also used in conjunction with the
  496. factory-method element to construct beans using static or instance
  497. factory methods.
  498. ]]></xsd:documentation>
  499. </xsd:annotation>
  500. <xsd:complexType>
  501. <xsd:sequence>
  502. <xsd:element ref="description" minOccurs="0"/>
  503. <xsd:choice minOccurs="0" maxOccurs="1">
  504. <xsd:element ref="bean"/>
  505. <xsd:element ref="ref"/>
  506. <xsd:element ref="idref"/>
  507. <xsd:element ref="value"/>
  508. <xsd:element ref="null"/>
  509. <xsd:element ref="list"/>
  510. <xsd:element ref="set"/>
  511. <xsd:element ref="map"/>
  512. <xsd:element ref="props"/>
  513. <xsd:any namespace="##other" processContents="strict"/>
  514. </xsd:choice>
  515. </xsd:sequence>
  516. <xsd:attribute name="index" type="xsd:string">
  517. <xsd:annotation>
  518. <xsd:documentation><![CDATA[
  519. The exact index of the argument in the constructor argument list.
  520. Only needed to avoid ambiguities, e.g. in case of 2 arguments of
  521. the exact same type.
  522. ]]></xsd:documentation>
  523. </xsd:annotation>
  524. </xsd:attribute>
  525. <xsd:attribute name="type" type="xsd:string">
  526. <xsd:annotation>
  527. <xsd:documentation><![CDATA[
  528. The exact type of the constructor argument. Only needed to avoid
  529. ambiguities, e.g. in case of 2 single argument constructors
  530. that can both be converted from a String.
  531. ]]></xsd:documentation>
  532. </xsd:annotation>
  533. </xsd:attribute>
  534. <xsd:attribute name="ref" type="xsd:string">
  535. <xsd:annotation>
  536. <xsd:documentation><![CDATA[
  537. A short-cut alternative to a nested "<ref bean='...'/>" element.
  538. ]]></xsd:documentation>
  539. </xsd:annotation>
  540. </xsd:attribute>
  541. <xsd:attribute name="value" type="xsd:string">
  542. <xsd:annotation>
  543. <xsd:documentation><![CDATA[
  544. A short-cut alternative to a nested "<value>...<value/>" element.
  545. ]]></xsd:documentation>
  546. </xsd:annotation>
  547. </xsd:attribute>
  548. </xsd:complexType>
  549. </xsd:element>
  550. <xsd:element name="property" type="propertyType">
  551. <xsd:annotation>
  552. <xsd:documentation><![CDATA[
  553. Bean definitions can have zero or more properties.
  554. Property elements correspond to JavaBean setter methods exposed
  555. by the bean classes. Spring supports primitives, references to other
  556. beans in the same or related factories, lists, maps and properties.
  557. ]]></xsd:documentation>
  558. </xsd:annotation>
  559. </xsd:element>
  560. <xsd:element name="lookup-method">
  561. <xsd:annotation>
  562. <xsd:documentation><![CDATA[
  563. A lookup method causes the IoC container to override the given method
  564. and return the bean with the name given in the bean attribute. This is
  565. a form of Method Injection. It is particularly useful as an alternative
  566. to implementing the BeanFactoryAware interface, in order to be able to
  567. make getBean() calls for non-singleton instances at runtime. In this
  568. case, Method Injection is a less invasive alternative.
  569. ]]></xsd:documentation>
  570. </xsd:annotation>
  571. <xsd:complexType>
  572. <xsd:complexContent>
  573. <xsd:restriction base="xsd:anyType">
  574. <xsd:attribute name="name" type="xsd:string">
  575. <xsd:annotation>
  576. <xsd:documentation><![CDATA[
  577. The name of the lookup method. This method must take no arguments.
  578. ]]></xsd:documentation>
  579. </xsd:annotation>
  580. </xsd:attribute>
  581. <xsd:attribute name="bean" type="xsd:string">
  582. <xsd:annotation>
  583. <xsd:documentation><![CDATA[
  584. The name of the bean in the current or ancestor factories that
  585. the lookup method should resolve to. Often this bean will be a
  586. prototype, in which case the lookup method will return a distinct
  587. instance on every invocation. This is useful for single-threaded objects.
  588. ]]></xsd:documentation>
  589. </xsd:annotation>
  590. </xsd:attribute>
  591. </xsd:restriction>
  592. </xsd:complexContent>
  593. </xsd:complexType>
  594. </xsd:element>
  595. <xsd:element name="replaced-method">
  596. <xsd:annotation>
  597. <xsd:documentation><![CDATA[
  598. Similar to the lookup method mechanism, the replaced-method element
  599. is used to control IoC container method overriding: Method Injection.
  600. This mechanism allows the overriding of a method with arbitrary code.
  601. ]]></xsd:documentation>
  602. </xsd:annotation>
  603. <xsd:complexType>
  604. <xsd:sequence>
  605. <xsd:choice minOccurs="0" maxOccurs="unbounded">
  606. <xsd:element ref="arg-type"/>
  607. </xsd:choice>
  608. </xsd:sequence>
  609. <xsd:attribute name="name" type="xsd:string">
  610. <xsd:annotation>
  611. <xsd:documentation><![CDATA[
  612. The name of the method whose implementation must be replaced by the
  613. IoC container. If this method is not overloaded, there is no need
  614. to use arg-type subelements. If this method is overloaded, arg-type
  615. subelements must be used for all override definitions for the method.
  616. ]]></xsd:documentation>
  617. </xsd:annotation>
  618. </xsd:attribute>
  619. <xsd:attribute name="replacer" type="xsd:string">
  620. <xsd:annotation>
  621. <xsd:documentation source="java:org.springframework.beans.factory.support.MethodReplacer"><![CDATA[
  622. Bean name of an implementation of the MethodReplacer interface in the
  623. current or ancestor factories. This may be a singleton or prototype
  624. bean. If it is a prototype, a new instance will be used for each
  625. method replacement. Singleton usage is the norm.
  626. ]]></xsd:documentation>
  627. </xsd:annotation>
  628. </xsd:attribute>
  629. </xsd:complexType>
  630. </xsd:element>
  631. <xsd:element name="arg-type">
  632. <xsd:annotation>
  633. <xsd:documentation><![CDATA[
  634. Identifies an argument for a replaced method in the event of
  635. method overloading.
  636. ]]></xsd:documentation>
  637. </xsd:annotation>
  638. <xsd:complexType mixed="true">
  639. <xsd:choice minOccurs="0" maxOccurs="unbounded"/>
  640. <xsd:attribute name="match" type="xsd:string">
  641. <xsd:annotation>
  642. <xsd:documentation><![CDATA[
  643. Specification of the type of an overloaded method argument as a String.
  644. For convenience, this may be a substring of the FQN. E.g. all the
  645. following would match "java.lang.String":
  646. - java.lang.String
  647. - String
  648. - Str
  649. As the number of arguments will be checked also, this convenience
  650. can often be used to save typing.
  651. ]]></xsd:documentation>
  652. </xsd:annotation>
  653. </xsd:attribute>
  654. </xsd:complexType>
  655. </xsd:element>
  656. <xsd:element name="ref">
  657. <xsd:annotation>
  658. <xsd:documentation><![CDATA[
  659. Defines a reference to another bean in this factory or an external
  660. factory (parent or included factory).
  661. ]]></xsd:documentation>
  662. </xsd:annotation>
  663. <xsd:complexType>
  664. <xsd:complexContent>
  665. <xsd:restriction base="xsd:anyType">
  666. <xsd:attribute name="bean" type="xsd:string">
  667. <xsd:annotation>
  668. <xsd:documentation><![CDATA[
  669. The name of the referenced bean.
  670. ]]></xsd:documentation>
  671. </xsd:annotation>
  672. </xsd:attribute>
  673. <xsd:attribute name="local" type="xsd:IDREF">
  674. <xsd:annotation>
  675. <xsd:documentation><![CDATA[
  676. The name of the referenced bean. The value must be a bean ID and thus can
  677. be checked by the XML parser. This is therefore the preferred technique
  678. for referencing beans within the same bean factory XML file.
  679. ]]></xsd:documentation>
  680. </xsd:annotation>
  681. </xsd:attribute>
  682. <xsd:attribute name="parent" type="xsd:string">
  683. <xsd:annotation>
  684. <xsd:documentation><![CDATA[
  685. The name of the referenced bean in a parent factory.
  686. ]]></xsd:documentation>
  687. </xsd:annotation>
  688. </xsd:attribute>
  689. </xsd:restriction>
  690. </xsd:complexContent>
  691. </xsd:complexType>
  692. </xsd:element>
  693. <xsd:element name="idref">
  694. <xsd:annotation>
  695. <xsd:documentation><![CDATA[
  696. The id of another bean in this factory or an external factory
  697. (parent or included factory).
  698. While a regular 'value' element could instead be used for the
  699. same effect, using idref in this case allows validation of local
  700. bean ids by the XML parser, and name completion by supporting tools.
  701. ]]></xsd:documentation>
  702. </xsd:annotation>
  703. <xsd:complexType>
  704. <xsd:complexContent>
  705. <xsd:restriction base="xsd:anyType">
  706. <xsd:attribute name="bean" type="xsd:string">
  707. <xsd:annotation>
  708. <xsd:documentation><![CDATA[
  709. The name of the referenced bean.
  710. ]]></xsd:documentation>
  711. </xsd:annotation>
  712. </xsd:attribute>
  713. <xsd:attribute name="local" type="xsd:IDREF">
  714. <xsd:annotation>
  715. <xsd:documentation><![CDATA[
  716. The name of the referenced bean. The value must be a bean ID and thus can
  717. be checked by the XML parser. This is therefore the preferred technique
  718. for referencing beans within the same bean factory XML file.
  719. ]]></xsd:documentation>
  720. </xsd:annotation>
  721. </xsd:attribute>
  722. </xsd:restriction>
  723. </xsd:complexContent>
  724. </xsd:complexType>
  725. </xsd:element>
  726. <xsd:element name="value">
  727. <xsd:annotation>
  728. <xsd:documentation><![CDATA[
  729. Contains a string representation of a property value.
  730. The property may be a string, or may be converted to the required
  731. type using the JavaBeans PropertyEditor machinery. This makes it
  732. possible for application developers to write custom PropertyEditor
  733. implementations that can convert strings to arbitrary target objects.
  734. Note that this is recommended for simple objects only. Configure
  735. more complex objects by populating JavaBean properties with
  736. references to other beans.
  737. ]]></xsd:documentation>
  738. </xsd:annotation>
  739. <xsd:complexType mixed="true">
  740. <xsd:choice minOccurs="0" maxOccurs="unbounded"/>
  741. <xsd:attribute name="type" type="xsd:string">
  742. <xsd:annotation>
  743. <xsd:documentation><![CDATA[
  744. The exact type that the value should be converted to. Only needed
  745. if the type of the target property or constructor argument is
  746. too generic: for example, in case of a collection element.
  747. ]]></xsd:documentation>
  748. </xsd:annotation>
  749. </xsd:attribute>
  750. </xsd:complexType>
  751. </xsd:element>
  752. <xsd:element name="null">
  753. <xsd:annotation>
  754. <xsd:documentation><![CDATA[
  755. Denotes a Java null value. Necessary because an empty "value" tag
  756. will resolve to an empty String, which will not be resolved to a
  757. null value unless a special PropertyEditor does so.
  758. ]]></xsd:documentation>
  759. </xsd:annotation>
  760. <xsd:complexType mixed="true">
  761. <xsd:choice minOccurs="0" maxOccurs="unbounded"/>
  762. </xsd:complexType>
  763. </xsd:element>
  764. <!-- Collection Elements -->
  765. <xsd:group name="collectionElements">
  766. <xsd:sequence>
  767. <xsd:choice minOccurs="0" maxOccurs="unbounded">
  768. <xsd:element ref="bean"/>
  769. <xsd:element ref="ref"/>
  770. <xsd:element ref="idref"/>
  771. <xsd:element ref="value"/>
  772. <xsd:element ref="null"/>
  773. <xsd:element ref="list"/>
  774. <xsd:element ref="set"/>
  775. <xsd:element ref="map"/>
  776. <xsd:element ref="props"/>
  777. <xsd:any namespace="##other" processContents="strict" minOccurs="0" maxOccurs="unbounded"/>
  778. </xsd:choice>
  779. </xsd:sequence>
  780. </xsd:group>
  781. <xsd:element name="list" type="listOrSetType">
  782. <xsd:annotation>
  783. <xsd:documentation><![CDATA[
  784. A list can contain multiple inner bean, ref, collection, or value elements.
  785. A list can also map to an array type; the necessary conversion is performed
  786. automatically.
  787. ]]></xsd:documentation>
  788. </xsd:annotation>
  789. </xsd:element>
  790. <xsd:element name="set" type="listOrSetType">
  791. <xsd:annotation>
  792. <xsd:documentation><![CDATA[
  793. A set can contain multiple inner bean, ref, collection, or value elements.
  794. ]]></xsd:documentation>
  795. </xsd:annotation>
  796. </xsd:element>
  797. <xsd:element name="map" type="mapType">
  798. <xsd:annotation>
  799. <xsd:documentation><![CDATA[
  800. A mapping from a key to an object. Maps may be empty.
  801. ]]></xsd:documentation>
  802. </xsd:annotation>
  803. </xsd:element>
  804. <xsd:element name="entry" type="entryType">
  805. <xsd:annotation>
  806. <xsd:documentation><![CDATA[
  807. A map entry can be an inner bean, ref, value, or collection.
  808. The key of the entry is given by the "key" attribute or child element.
  809. ]]></xsd:documentation>
  810. </xsd:annotation>
  811. </xsd:element>
  812. <xsd:element name="props" type="propsType">
  813. <xsd:annotation>
  814. <xsd:documentation><![CDATA[
  815. Props elements differ from map elements in that values must be strings.
  816. Props may be empty.
  817. ]]></xsd:documentation>
  818. </xsd:annotation>
  819. </xsd:element>
  820. <xsd:element name="key">
  821. <xsd:annotation>
  822. <xsd:documentation><![CDATA[
  823. A key element can contain an inner bean, ref, value, or collection.
  824. ]]></xsd:documentation>
  825. </xsd:annotation>
  826. <xsd:complexType>
  827. <xsd:group ref="collectionElements"/>
  828. </xsd:complexType>
  829. </xsd:element>
  830. <xsd:element name="prop">
  831. <xsd:annotation>
  832. <xsd:documentation><![CDATA[
  833. The string value of the property. Note that whitespace is trimmed
  834. off to avoid unwanted whitespace caused by typical XML formatting.
  835. ]]></xsd:documentation>
  836. </xsd:annotation>
  837. <xsd:complexType mixed="true">
  838. <xsd:choice minOccurs="0" maxOccurs="unbounded"/>
  839. <xsd:attribute name="key" type="xsd:string" use="required">
  840. <xsd:annotation>
  841. <xsd:documentation><![CDATA[
  842. The key of the property entry.
  843. ]]></xsd:documentation>
  844. </xsd:annotation>
  845. </xsd:attribute>
  846. </xsd:complexType>
  847. </xsd:element>
  848. <xsd:complexType name="propertyType">
  849. <xsd:sequence>
  850. <xsd:element ref="description" minOccurs="0"/>
  851. <xsd:choice minOccurs="0" maxOccurs="1">
  852. <xsd:element ref="meta"/>
  853. <xsd:element ref="bean"/>
  854. <xsd:element ref="ref"/>
  855. <xsd:element ref="idref"/>
  856. <xsd:element ref="value"/>
  857. <xsd:element ref="null"/>
  858. <xsd:element ref="list"/>
  859. <xsd:element ref="set"/>
  860. <xsd:element ref="map"/>
  861. <xsd:element ref="props"/>
  862. <xsd:any namespace="##other" processContents="strict"/>
  863. </xsd:choice>
  864. </xsd:sequence>
  865. <xsd:attribute name="name" type="xsd:string" use="required">
  866. <xsd:annotation>
  867. <xsd:documentation><![CDATA[
  868. The name of the property, following JavaBean naming conventions.
  869. ]]></xsd:documentation>
  870. </xsd:annotation>
  871. </xsd:attribute>
  872. <xsd:attribute name="ref" type="xsd:string">
  873. <xsd:annotation>
  874. <xsd:documentation><![CDATA[
  875. A short-cut alternative to a nested "<ref bean='...'/>".
  876. ]]></xsd:documentation>
  877. </xsd:annotation>
  878. </xsd:attribute>
  879. <xsd:attribute name="value" type="xsd:string">
  880. <xsd:annotation>
  881. <xsd:documentation><![CDATA[
  882. A short-cut alternative to a nested "<value>...</value>"
  883. element.
  884. ]]></xsd:documentation>
  885. </xsd:annotation>
  886. </xsd:attribute>
  887. </xsd:complexType>
  888. <!-- Collection Types -->
  889. <!-- base collection type -->
  890. <xsd:complexType name="baseCollectionType">
  891. <xsd:attribute name="merge" type="defaultable-boolean">
  892. <xsd:annotation>
  893. <xsd:documentation><![CDATA[
  894. Enables/disables merging for collections when using parent/child beans.
  895. ]]></xsd:documentation>
  896. </xsd:annotation>
  897. </xsd:attribute>
  898. </xsd:complexType>
  899. <!-- base type for collections that have (possibly) typed nested values -->
  900. <xsd:complexType name="typedCollectionType">
  901. <xsd:complexContent>
  902. <xsd:extension base="baseCollectionType">
  903. <xsd:attribute name="value-type" type="xsd:string">
  904. <xsd:annotation>
  905. <xsd:documentation source="java:java.lang.Class"><![CDATA[
  906. The default Java type for nested values. Must be a fully qualified
  907. class name.
  908. ]]></xsd:documentation>
  909. </xsd:annotation>
  910. </xsd:attribute>
  911. </xsd:extension>
  912. </xsd:complexContent>
  913. </xsd:complexType>
  914. <!-- 'list' and 'set' collection type -->
  915. <xsd:complexType name="listOrSetType">
  916. <xsd:complexContent>
  917. <xsd:extension base="typedCollectionType">
  918. <xsd:group ref="collectionElements"/>
  919. </xsd:extension>
  920. </xsd:complexContent>
  921. </xsd:complexType>
  922. <!-- 'map' element type -->
  923. <xsd:complexType name="mapType">
  924. <xsd:complexContent>
  925. <xsd:extension base="typedCollectionType">
  926. <xsd:sequence>
  927. <xsd:choice minOccurs="0" maxOccurs="unbounded">
  928. <xsd:element ref="entry"/>
  929. </xsd:choice>
  930. </xsd:sequence>
  931. <xsd:attribute name="key-type" type="xsd:string">
  932. <xsd:annotation>
  933. <xsd:documentation source="java:java.lang.Class"><![CDATA[
  934. The default Java type for nested entry keys. Must be a fully qualified
  935. class name.
  936. ]]></xsd:documentation>
  937. </xsd:annotation>
  938. </xsd:attribute>
  939. </xsd:extension>
  940. </xsd:complexContent>
  941. </xsd:complexType>
  942. <!-- 'entry' element type -->
  943. <xsd:complexType name="entryType">
  944. <xsd:sequence>
  945. <xsd:element ref="key" minOccurs="0"/>
  946. <xsd:group ref="collectionElements"/>
  947. </xsd:sequence>
  948. <xsd:attribute name="key" type="xsd:string">
  949. <xsd:annotation>
  950. <xsd:documentation><![CDATA[
  951. Each map element must specify its key as attribute or as child element.
  952. A key attribute is always a String value.
  953. ]]></xsd:documentation>
  954. </xsd:annotation>
  955. </xsd:attribute>
  956. <xsd:attribute name="key-ref" type="xsd:string">
  957. <xsd:annotation>
  958. <xsd:documentation><![CDATA[
  959. A short-cut alternative to a to a "key" element with a nested
  960. "<ref bean='...'/>".
  961. ]]></xsd:documentation>
  962. </xsd:annotation>
  963. </xsd:attribute>
  964. <xsd:attribute name="value" type="xsd:string">
  965. <xsd:annotation>
  966. <xsd:documentation><![CDATA[
  967. A short-cut alternative to a nested "<value>...</value>"
  968. element.
  969. ]]></xsd:documentation>
  970. </xsd:annotation>
  971. </xsd:attribute>
  972. <xsd:attribute name="value-ref" type="xsd:string">
  973. <xsd:annotation>
  974. <xsd:documentation><![CDATA[
  975. A short-cut alternative to a nested "<ref bean='...'/>".
  976. ]]></xsd:documentation>
  977. </xsd:annotation>
  978. </xsd:attribute>
  979. </xsd:complexType>
  980. <!-- 'props' collection type -->
  981. <xsd:complexType name="propsType">
  982. <xsd:complexContent>
  983. <xsd:extension base="baseCollectionType">
  984. <xsd:sequence>
  985. <xsd:choice minOccurs="0" maxOccurs="unbounded">
  986. <xsd:element ref="prop"/>
  987. </xsd:choice>
  988. </xsd:sequence>
  989. </xsd:extension>
  990. </xsd:complexContent>
  991. </xsd:complexType>
  992. <!-- simple internal types -->
  993. <xsd:simpleType name="defaultable-boolean">
  994. <xsd:restriction base="xsd:NMTOKEN">
  995. <xsd:enumeration value="default"/>
  996. <xsd:enumeration value="true"/>
  997. <xsd:enumeration value="false"/>
  998. </xsd:restriction>
  999. </xsd:simpleType>
  1000. </xsd:schema>