开发者

intellij and ResourceBundle

开发者 https://www.devze.com 2023-03-03 00:37 出处:网络
I try to run tests from Intellij. Methods I test uses some properties files fr开发者_高级运维om src/main/resources but seems like they are ignored when I run it as JUnit test. It works when I run it f

I try to run tests from Intellij. Methods I test uses some properties files fr开发者_高级运维om src/main/resources but seems like they are ignored when I run it as JUnit test. It works when I run it from eclipse and ant but not from Intellij. How can I make my src/main/resources visible for tests in Intellij? Dont know if it matters but test and main folders are treated like separated modules in my project view.


Verify that src/main/resources is set as Sources or as Test Sources in the project structure. Resources from such folders are copied to the output path (classpath) automatically according to Settings | Compiler | Resource Patterns.

0

精彩评论

暂无评论...
验证码 换一张
取 消