微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

spring.handlers spring.schema xml xsd在Spring中的使用

 

Spring中对于Bean的定义文件描述

<xsd:element name="bean">
    <xsd:complexType>
        <xsd:complexContent>
            <xsd:extension base="identifiedType">
                <xsd:group ref="beanElements"/>
                <xsd:attributeGroup ref="beanAttributes"/>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>
</xsd:element>
<xsd:complexType name="identifiedType" abstract="true">
    <xsd:attribute name="id" type="xsd:string"></xsd:attribute>
</xsd:complexType>
<xsd:group name="beanElements">
    <xsd:sequence>
        <xsd:element ref="description" minOccurs="0"/>
        <xsd:choice minOccurs="0" maxOccurs="unbounded">
            <xsd:element ref="Meta"/>
            <xsd:element ref="constructor-arg"/>
            <xsd:element ref="property"/>
            <xsd:element ref="qualifier"/>
            <xsd:element ref="lookup-method"/>
            <xsd:element ref="replaced-method"/>
            <xsd:any namespace="##other" processContents="strict" minOccurs="0" maxOccurs="unbounded"/>
        </xsd:choice>
    </xsd:sequence>
</xsd:group>
<xsd:attributeGroup name="beanAttributes">
    <xsd:attribute name="name" type="xsd:string"></xsd:attribute>
    <xsd:attribute name="class" type="xsd:string"></xsd:attribute>
    <xsd:attribute name="parent" type="xsd:string"></xsd:attribute>
    <xsd:attribute name="scope" type="xsd:string"></xsd:attribute>
    <xsd:attribute name="abstract" type="xsd:boolean"></xsd:attribute>
    <xsd:attribute name="lazy-init" default="default" type="defaultable-boolean"></xsd:attribute>
    <xsd:attribute name="autowire" default="default">
        <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="depends-on" type="xsd:string"></xsd:attribute>
    <xsd:attribute name="autowire-candidate" default="default" type="defaultable-boolean"></xsd:attribute>
    <xsd:attribute name="primary" type="xsd:boolean"></xsd:attribute>
    <xsd:attribute name="init-method" type="xsd:string"></xsd:attribute>
    <xsd:attribute name="destroy-method" type="xsd:string"></xsd:attribute>
    <xsd:attribute name="factory-method" type="xsd:string"></xsd:attribute>
    <xsd:attribute name="factory-bean" type="xsd:string"></xsd:attribute>
    <xsd:anyAttribute namespace="##other" processContents="lax"/>
</xsd:attributeGroup>

http://www.springframework.org/schema/beans/spring-beans.xsd

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。