maven中的testResources標籤

平時做junit測試時.默認都是test可以讀取到main中的resource目錄配置的..... 今天在做spring boot 的單元測試時.發現test目錄下無法讀取到main中的resource目錄配置..... 解決方案.通過在pom.xml build中添加testResource標籤.如下: <!--單元測試時引用src/main/resources下的資源文件 如何test下面有同
相關文章
相關標籤/搜索