久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

    <bdo id='IL3KB'></bdo><ul id='IL3KB'></ul>
  • <legend id='IL3KB'><style id='IL3KB'><dir id='IL3KB'><q id='IL3KB'></q></dir></style></legend>
      <i id='IL3KB'><tr id='IL3KB'><dt id='IL3KB'><q id='IL3KB'><span id='IL3KB'><b id='IL3KB'><form id='IL3KB'><ins id='IL3KB'></ins><ul id='IL3KB'></ul><sub id='IL3KB'></sub></form><legend id='IL3KB'></legend><bdo id='IL3KB'><pre id='IL3KB'><center id='IL3KB'></center></pre></bdo></b><th id='IL3KB'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='IL3KB'><tfoot id='IL3KB'></tfoot><dl id='IL3KB'><fieldset id='IL3KB'></fieldset></dl></div>

    1. <small id='IL3KB'></small><noframes id='IL3KB'>

    2. <tfoot id='IL3KB'></tfoot>

        為什么我無法在使用 Maven 的 Junit 測試運行中訪問

        Why Can#39;t I access src/test/resources in Junit test run with Maven?(為什么我無法在使用 Maven 的 Junit 測試運行中訪問 src/test/resources?)

            <tbody id='qvUjA'></tbody>
          • <bdo id='qvUjA'></bdo><ul id='qvUjA'></ul>
          • <legend id='qvUjA'><style id='qvUjA'><dir id='qvUjA'><q id='qvUjA'></q></dir></style></legend>

            • <tfoot id='qvUjA'></tfoot>
              1. <i id='qvUjA'><tr id='qvUjA'><dt id='qvUjA'><q id='qvUjA'><span id='qvUjA'><b id='qvUjA'><form id='qvUjA'><ins id='qvUjA'></ins><ul id='qvUjA'></ul><sub id='qvUjA'></sub></form><legend id='qvUjA'></legend><bdo id='qvUjA'><pre id='qvUjA'><center id='qvUjA'></center></pre></bdo></b><th id='qvUjA'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='qvUjA'><tfoot id='qvUjA'></tfoot><dl id='qvUjA'><fieldset id='qvUjA'></fieldset></dl></div>
              2. <small id='qvUjA'></small><noframes id='qvUjA'>

                  本文介紹了為什么我無法在使用 Maven 的 Junit 測試運行中訪問 src/test/resources?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我在運行以下代碼時遇到問題:

                  I am having a problems running the following code:

                  configService.setMainConfig("src/test/resources/MainConfig.xml");
                  

                  從 Junit @Before 方法中.

                  From within a Junit @Before method.

                  這是 Maven 構建其目標文件夾的方式嗎?

                  Is this the way Maven builds out its target folder?

                  推薦答案

                  直接訪問MainConfig.xml.src/test/resources 目錄內容放置在您的 CLASSPATH 的根目錄中.

                  Access MainConfig.xml directly. The src/test/resources directory contents are placed in the root of your CLASSPATH.

                  更準確地說:src/test/resources的內容被復制到target/test-classes中,所以如果你有以下項目結構:

                  More precisely: contents of src/test/resources are copied into target/test-classes, so if you have the following project structure:

                  .
                  └── src
                      └── test
                          ├── java
                          │?? └── foo
                          │??     └── C.java
                          └── resources
                              ├── a.xml
                              └── foo
                                  └── b.xml
                  

                  它將產生以下測試 CLASSPATH 內容:

                  It will result with the following test CLASSPATH contents:

                  • /foo/C.class
                  • /a.xml
                  • /foo/b.xml

                  要真正從 Java 源訪問文件,請使用getClass().getResource("/MainConfig.xml").getFile().

                  To actually access the files from Java source, use getClass().getResource("/MainConfig.xml").getFile().

                  這篇關于為什么我無法在使用 Maven 的 Junit 測試運行中訪問 src/test/resources?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  How can I detect integer overflow on 32 bits int?(如何檢測 32 位 int 上的整數溢出?)
                  Local variables before return statements, does it matter?(return 語句之前的局部變量,這有關系嗎?)
                  How to convert Integer to int?(如何將整數轉換為整數?)
                  How do I create an int array with randomly shuffled numbers in a given range(如何在給定范圍內創建一個隨機打亂數字的 int 數組)
                  Inconsistent behavior on java#39;s ==(java的行為不一致==)
                  Why is Java able to store 0xff000000 as an int?(為什么 Java 能夠將 0xff000000 存儲為 int?)

                      <i id='8nY0J'><tr id='8nY0J'><dt id='8nY0J'><q id='8nY0J'><span id='8nY0J'><b id='8nY0J'><form id='8nY0J'><ins id='8nY0J'></ins><ul id='8nY0J'></ul><sub id='8nY0J'></sub></form><legend id='8nY0J'></legend><bdo id='8nY0J'><pre id='8nY0J'><center id='8nY0J'></center></pre></bdo></b><th id='8nY0J'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='8nY0J'><tfoot id='8nY0J'></tfoot><dl id='8nY0J'><fieldset id='8nY0J'></fieldset></dl></div>

                      <tfoot id='8nY0J'></tfoot>
                      • <bdo id='8nY0J'></bdo><ul id='8nY0J'></ul>

                      • <small id='8nY0J'></small><noframes id='8nY0J'>

                          <legend id='8nY0J'><style id='8nY0J'><dir id='8nY0J'><q id='8nY0J'></q></dir></style></legend>

                              <tbody id='8nY0J'></tbody>
                            主站蜘蛛池模板: 国产黄色在线 | 欧美成人猛片aaaaaaa | 狠狠的干狠狠的操 | 国产精品爱久久久久久久 | 美女黄色在线观看 | 久久精品国产99国产精品 | 午夜影视免费片在线观看 | 日韩欧美一区二区三区免费看 | 欧美日韩亚洲成人 | 国产精品久久久久久久久久久久久 | 久久久久久久国产精品影院 | 亚洲欧美国产精品一区二区 | a免费在线 | 欧美久久久久久久久 | 成人国产精品色哟哟 | 日本免费一区二区三区 | 亚洲精品一区二区在线观看 | 国产高清av免费观看 | 日韩三级| 欧美黄视频 | 欧美激情亚洲 | 99久久精品国产一区二区三区 | 国产.com| 91成人精品 | 免费成人在线网站 | www.久草 | 国产色网站 | 四虎在线观看 | 欧美亚洲国产一区 | 成人免费观看视频 | 精品欧美一区二区三区久久久 | 97色伦网| 久久国产精品一区 | 国产中文在线 | 免费成人高清 | 欧美日韩在线高清 | 99热精品在线 | 狠狠综合久久av一区二区小说 | www.成人.com| av中文字幕在线观看 | 国产高清免费视频 |