The difference is that the generated source roots are not suggested as target folders when performing the Move Class refactoring or using the Create Class from Usage quick fix.
这是官方说明两者的区别,自己翻译吧,我是看懂了,英文一般就不写上意思了。
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.
In Java modules, the subfolders within the source roots represent your Java package structure.
You can assign a package prefix to a source root (e.g.com.mycompany.myapp) instead of creating the corresponding folder structure within that source root (e.g.com/mycompany/myapp). For more information, see Package prefix for Java source roots.
In the absence of the package prefix and the subfolders, a source root would represent the default package (an unnamed package).
Generated source roots (or generated source folders; in certain views the [generated] text marker is used) are similar to source roots. The difference is that the generated source roots are not suggested as target folders when performing the Move Class refactoring or using the Create Class from Usage quick fix.
不是很懂