Resource files not found from JUnit test cases

前端 未结 6 2090
无人及你
无人及你 2020-12-24 04:45

Summary

My JUnit tests are not finding the files they require during execution. I\'m using Maven for dependency management and compilation.

6条回答
  •  天涯浪人
    2020-12-24 05:15

    You know that Maven is based on the Convention over Configuration pardigm? so you shouldn't configure things which are the defaults.

    All that stuff represents the default in Maven. So best practice is don't define it it's already done.

        target
        target/classes
        target/test-classes
        src/main/java
        src/test/java
        
            
                src/main/resources
            
        
        
            
                src/test/resources
            
        
    

提交回复
热议问题