在IntelliJ IDEA中可以将文件夹标记为各种root文件夹,大致如下图所示:
这些root文件夹有何区别呢?
1. Source roots (or source folders)
By assigning a folder to this category, you tell IntelliJ IDEA that this folder and its subfolders contain source code that should be compiled as part of the build process.
通过将文件夹加入这种类别,来告诉IntelliJ IDEA,这个文件夹和它的子文件夹中包含源码,在构建工程时,需要作为一部分被编译进去。
2. Test source roots (or test source folders; shown as rootTest)
These roots are similar to source roots but are for code intended for testing (e.g. for unit tests). Test source folders let you keep the code related to testing separate from the production code.
Compilation results for sources and test sources, normally, are placed into different folders.
这个类型的文件夹也用于存放源码&#