<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                如上圖所示,spring ioc容器能識別3種配置元數據;作為開發人員的你通過這些配置元數據就能告訴spring如何去實例化,配置,組裝應用中的對象。 傳統上,配置元數據使用簡單直觀的xml格式,也是本章大部分表達spring ioc容器的關鍵概念和特點使用的格式。 定義bean的配置必須由容器管理。基于xml的配置元數據把bean配置為頂級元素`<beans>`內的元素`<bean>`。java注解配置通常在@Configuration類中使用@Bean。 這些bean定義對應組成程序的實際對象。通常,你可以定義服務層對象,數據訪問(DAOs)對象,表示層對象如Struts Action,基礎對象如Hibernate SessionFactories,JMS 隊列等等。通常不會在容器中配置細粒度的對象,因為這些對象的創建和加載是數據訪問層和業務邏輯層的責任。然而,你可以使用spring集成AspectJ來配置那些ioc 容器控制之外所創建的對象。參考[aop-configurable](https://docs.spring.io/spring/docs/5.0.6.RELEASE/spring-framework-reference/core.html#aop-atconfigurable)。 下面是一個基于xml的基本配置示例 ~~~xml <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"> <bean id="..." class="..."> <!-- 這里是bean的配置和組合對象 --> </bean> <bean id="..." class="..."> <!-- 這里是bean的配置和組合對象 --> </bean> <!--更多的bean--> </beans> ~~~ 屬性id是字符串,用來標識唯一的bean。屬性class標識bean的類型,使用帶包結構的完整類名。組合對象要引用屬性id的值。這里并沒有給出示例,可以參考[依賴](https://docs.spring.io/spring/docs/5.0.6.RELEASE/spring-framework-reference/core.html#beans-dependencies)。
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看