标签系列一:spring 中beans解释以及beans标签里面的属性

一、beans解释:

    英文解释:The top level (typically root) element. Allows the definition of default values for all nested bean definitions.

    上句翻译:顶层(通常为根)元素。允许定义所有嵌套bean定义的默认值。

二、beans标签里面的属性(name为属性名,default为默认值,type为=“ ”引号里面填的类型):

    下面的属性bean里面也有,请参考我的bean的解释和属性文章。

    1、name="default-lazy-init"     default="false"     type="xsd:boolean"

    2、name="default-merge"       default="false"     type="xsd:boolean"

    3、name="default-autowire"     default="no"

    4、name="default-autowire-candidates"     type="xsd:string"

    5、name="default-init-method"     type="xsd:string"

    6、name="default-destroy-method"     type="xsd:string"

三、beans标签下一层的标签(ref为下一层标签名字,minOccurs为最小出现次数,maxOccurs为最多出现次数):

    1、ref="description"     minOccurs="0"

     英文解释:Contains informative text describing the purpose of the enclosing element. Used primarily for user documentation of XML bean definition documents.

     上句翻译:包含描述封闭元素用途的信息性文本。主要用于XML bean定义文档的用户文档。

    2、choice为在里面选择一个

    <xsd:choice     minOccurs="0"     maxOccurs="unbounded">

            <xsd:element     ref="import"/>

            <xsd:element     ref="alias"/>

            <xsd:element     ref="bean"/>

    </xsd:choice>

    2.1、<import>标签:
     

      英文解释:Specifies an XML bean definition resource to import.

     上句翻译:指定要导入的XML bean定义资源。

    <import>标签的属性(use为改属性是否必须出现):

           (1)、name="resource"     type="xsd:string"     use="required"                       

                    英文解释:The relative resource location of the XML (bean definition) file to import, for example "myImport.xml" or "includes/myImport.xml" or "../myImport.xml".

         上句翻译:要导入的XML(bean定义)文件的相对资源位置,例如“myImport.xml”或“includes / myImport.xml”或“../myImport.xml”。

    2.2、<alias>标签:

        英文解释:Defines an alias for a bean (which can reside in a different definition resource).

       上句翻译:定义bean的别名(可以驻留在不同的定义资源中)。

       <alias>标签的属性:

             (1)、name="name"      type="xsd:string"      use="required"

                        英文解释:The name of the bean to define an alias for.

                        上句翻译:用于定义别名的bean的名称。

             (2)、name="alias"     type="xsd:string"     use="required"

                         英文解释:The alias name to define for the bean.

                         上句翻译:要为bean定义的别名。

    2.3、<bean>请参考我的bean的解释和属性文章。

  • 2
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值