<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>

                企業??AI智能體構建引擎,智能編排和調試,一鍵部署,支持知識庫和私有化部署方案 廣告
                spring ioc容器管理著眾多的beans。這些bean是根據配置元數據創建的,如xml格式的`<bean/>`元素。 在容器中,這些bean定義表示為BeanDefinition對象,包括以下元數據: * 包限定的類名稱:通常是定義bean的實現類 * bean行為配置元素,說明bean在容器中的行為狀態(范圍,生命周期,回調等) * 引用其他bean,這些bean叫做協作者或依賴 * 新創建對象的其他設置,如管理連接池的bean,設置連接的數量或大小限制 這些元數據轉成一組屬性構成bean定義。 *表1 bean定義* | 屬性 | 說明 | | --- | --- | | class | [實例化bean](https://docs.spring.io/spring/docs/5.0.6.RELEASE/spring-framework-reference/core.html#beans-factory-class) | |name|[命名bean](https://docs.spring.io/spring/docs/5.0.6.RELEASE/spring-framework-reference/core.html#beans-beanname)| |scope|[bean范圍](https://docs.spring.io/spring/docs/5.0.6.RELEASE/spring-framework-reference/core.html#beans-factory-scopes)| |constructor arguments|[構造參數](https://docs.spring.io/spring/docs/5.0.6.RELEASE/spring-framework-reference/core.html#beans-factory-collaborators)| |properties|[屬性](https://docs.spring.io/spring/docs/5.0.6.RELEASE/spring-framework-reference/core.html#beans-factory-collaborators)| |autowiring mode|[自動裝配](https://docs.spring.io/spring/docs/5.0.6.RELEASE/spring-framework-reference/core.html#beans-factory-autowire)| |lazy-initialization mode|[懶加載模式](https://docs.spring.io/spring/docs/5.0.6.RELEASE/spring-framework-reference/core.html#beans-factory-lazy-init)| |initialization method|[實例方法](https://docs.spring.io/spring/docs/5.0.6.RELEASE/spring-framework-reference/core.html#beans-factory-lifecycle-initializingbean)| |destruction method|[銷毀方法](https://docs.spring.io/spring/docs/5.0.6.RELEASE/spring-framework-reference/core.html#beans-factory-lifecycle-disposablebean)| 容器外部創建的對象也可以注冊到容器,通過ApplicationContext的方法getBeanFactory()獲得BeanFactory的實現DefaultListableBeanFactory。再通過DefaultListableBeanFactory的方法registerSingleton(..) 和registerBeanDefinition(..)注冊對象。然而,一般應用程序都使用元數據來定義bean。 > 手動創建的對象要盡早注冊到容器中,以便容器在裝配和自我檢查時合理評估它們。雖然支持某些程度的重寫配置和實例,但是在運行時注冊新bean是不支持的,并且可能導致并發訪問的異常或bean狀態不一致
                  <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>

                              哎呀哎呀视频在线观看