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

                ??碼云GVP開源項目 12k star Uniapp+ElementUI 功能強大 支持多語言、二開方便! 廣告
                構造應用上下文的時候,需要字符串參數或數組作為資源,如xml文件的路徑組成上下的定義. 當這樣的位置路徑沒有前綴時,從該路徑構建并用于加載bean定義的特定資源類型取決于特定的應用程序上下文并適合于該特定的應用程序上下文。 例如,如果您按照以下方式創建`ClassPathXmlApplicationContext`: ~~~java ApplicationContext ctx = new ClassPathXmlApplicationContext("conf/appContext.xml"); ~~~ 由于將使用ClassPathResource,因此將從類路徑加載bean定義。 但是,如果您創建FileSystemXmlApplicationContext,如下所示: ~~~java ApplicationContext ctx = new FileSystemXmlApplicationContext("conf/appContext.xml"); ~~~ bean定義將從文件系統位置加載,在這種情況下,相對于當前工作目錄。 請注意,在位置路徑中使用特殊類前綴或標準URL前綴將覆蓋創建的默認類型的資源。 所以下面這個`FileSystemXmlApplicationContext` ... ~~~ ApplicationContext ctx = new FileSystemXmlApplicationContext("classpath:conf/appContext.xml"); ~~~ 實際上會從類路徑中加載它的bean定義。 但是,它仍然是一個FileSystemXmlApplicationContext。 如果隨后將其用作ResourceLoader,則任何前綴不固定的路徑仍將被視為文件系統路徑。 ## Constructing ClassPathXmlApplicationContext instances - shortcuts `ClassPathXmlApplicationContext`公開了許多構造函數以方便實例化。 其基本思想是提供一個字符串數組,它只包含XML文件本身的文件名(沒有前導路徑信息),再提供一個`Class`; `ClassPathXmlApplicationContext`將從提供的類中派生路徑信息。 舉例說明,考慮下面的目錄結構 ~~~file com/ foo/ services.xml daos.xml MessengerService.class ~~~ `services.xml`和` daos.xml`兩個文件是bean的定義,`ClassPathXmlApplicationContext `的實例化如下: ~~~java ApplicationContext ctx = new ClassPathXmlApplicationContext( new String[] {"services.xml", "daos.xml"}, MessengerService.class); ~~~
                  <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>

                              哎呀哎呀视频在线观看