Spring中beans标签定义

<!-- Top-level <beans> tag -->
<xsd:element name="beans">
   <xsd:annotation>
      <xsd:documentation><![CDATA[
Container for <bean> and other elements, typically the root element in the document.
Allows the definition of default values for all nested bean definitions. May itself
be nested for the purpose of defining a subset of beans with certain default values or
to be registered only when certain profile(s) are active. Any such nested <beans> element
must be declared as the last element in the document.
      ]]></xsd:documentation>
   </xsd:annotation>
   <xsd:complexType>
      <xsd:sequence>
         <xsd:element ref="description" minOccurs="0"/>
         <xsd:choice minOccurs="0" maxOccurs="unbounded">
            <xsd:element ref="import"/>
            <xsd:element ref="alias"/>
            <xsd:element ref="bean"/>
            <xsd:any namespace="##other" processContents="strict" minOccurs="0" maxOccurs="unbounded"/>
         </xsd:choice>
         <xsd:element ref="beans" minOccurs="0" maxOccurs="unbounded"/>
      </xsd:sequence>
      <xsd:attribute name="profile" use="optional" type="xsd:string">
         <xsd:annotation>
            <xsd:documentation><![CDATA[
The set of profiles for which this <beans> element should be parsed. Multiple profiles
can be separated by spaces, commas, or semi-colons.

If one or more of the specified profiles are active at time of parsing, the <beans>
element will be parsed, and all of its <bean> elements registered, <import>
elements followed, etc.  If none of the specified profiles are active at time of
parsing, then the entire element and its contents will be ignored.

If a profile is prefixed with the NOT operator '!', e.g.

   <beans profile="p1,!p2">

indicates that the <beans> element should be parsed if profile "p1" is active or
if profile "p2" is not active.

Profiles are activated in one of two ways:
   Programmatic:
      ConfigurableEnvironment#setActiveProfiles(String...)
      ConfigurableEnvironment#setDefaultProfiles(String...)

   Properties (typically through -D system properties, environment variables, or
   servlet context init params):
      spring.profiles.active=p1,p2
      spring.profiles.default=p1,p2
            ]]></xsd:documentation>
         </xsd:annotation>
      </xsd:attribute>
      <xsd:attribute name="default-lazy-init" default="default" type="defaultable-boolean">
         <xsd:annotation>
            <xsd:documentation><![CDATA[
The default 'lazy-init' value; see the documentation for the
'lazy-init' attribute of the 'bean' element. The default is "default",
indicating inheritance from outer 'beans' sections in case of nesting,
otherwise falling back to "false".
            ]]></xsd:documentation>
         </xsd:annotation>
      </xsd:attribute>
      <xsd:attribute name="default-merge" default="default" type="defaultable-boolean">
         <xsd:annotation>
            <xsd:documentation><![CDATA[
The default 'merge' value; see the documentation for the 'merge'
attribute of the various collection elements. The default is "default",
indicating inheritance from outer 'beans' sections in case of nesting,
otherwise falling back to "false".
            ]]></xsd:documentation>
         </xsd:annotation>
      </xsd:attribute>
      <xsd:attribute name="default-autowire" default="default">
         <xsd:annotation>
            <xsd:documentation><![CDATA[
The default 'autowire' value; see the documentation for the
'autowire' attribute of the 'bean' element. The default is "default",
indicating inheritance from outer 'beans' sections in case of nesting,
otherwise falling back to "no" (i.e. no externally driven autowiring).
            ]]></xsd:documentation>
         </xsd:annotation>
         <xsd:simpleType>
            <xsd:restriction base="xsd:NMTOKEN">
               <xsd:enumeration value="default"/>
               <xsd:enumeration value="no"/>
               <xsd:enumeration value="byName"/>
               <xsd:enumeration value="byType"/>
               <xsd:enumeration value="constructor"/>
            </xsd:restriction>
         </xsd:simpleType>
      </xsd:attribute>
      <xsd:attribute name="default-autowire-candidates" type="xsd:string">
         <xsd:annotation>
            <xsd:documentation><![CDATA[
A default bean name pattern for identifying autowire candidates:
e.g. "*Service", "data*", "*Service*", "data*Service".
Also accepts a comma-separated list of patterns: e.g. "*Service,*Dao".
See the documentation for the 'autowire-candidate' attribute of the
'bean' element for the semantic details of autowire candidate beans.
            ]]></xsd:documentation>
         </xsd:annotation>
      </xsd:attribute>
      <xsd:attribute name="default-init-method" type="xsd:string">
         <xsd:annotation>
            <xsd:documentation><![CDATA[
The default 'init-method' value; see the documentation for the
'init-method' attribute of the 'bean' element.
            ]]></xsd:documentation>
         </xsd:annotation>
      </xsd:attribute>
      <xsd:attribute name="default-destroy-method" type="xsd:string">
         <xsd:annotation>
            <xsd:documentation><![CDATA[
The default 'destroy-method' value; see the documentation for the
'destroy-method' attribute of the 'bean' element.
            ]]></xsd:documentation>
         </xsd:annotation>
      </xsd:attribute>
      <xsd:anyAttribute namespace="##other" processContents="lax"/>
   </xsd:complexType>
</xsd:element>


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值