zoukankan      html  css  js  c++  java
  • spring 装配机制

    <beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:context="http://www.springframework.org/schema/context"
    xsi:schemaLocation="http://www.springframework.org/schema/beans
    http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
    http://www.springframework.org/schema/context
    http://www.springframework.org/schema/context/spring-context-3.0.xsd"
    default-autowire="byName">
    <beans>
    1.上面使用default-autowire="byName"
    查看default-autowire模板源码?

    枚举:

    <xsd:enumeration value="no"/>
    <xsd:enumeration value="byName"/>
    <xsd:enumeration value="byType"/>
    <xsd:enumeration value="constructor"/>

    四种类型:
    1.<xsd:enumeration value="no"/>-不自动注入
    2.<xsd:enumeration value="byName"/> 通过名称注入,类全名,首字母小写
    3.
    <xsd:enumeration value="byType"/> 通过类型注入,即引用时的名称。
    4.
    <xsd:enumeration value="constructor"/> 通过使用 配置的参数进行注入,如果参数不同,装配失败.



    
    
  • 相关阅读:
    JAVA并发-CountDownLatch
    【转载】Makedown数学公式语法
    算法的时间复杂度
    JVM-卡表(Card Table)
    sync.WaitGroup的使用以及坑
    go 多协程爬取图片
    go ioutial 读取写入文件
    go 下载图片
    go 正则 爬取邮箱代码
    go 解析path
  • 原文地址:https://www.cnblogs.com/dava/p/9713664.html
Copyright © 2011-2022 走看看