1. Maven template bug
According to Maven's template, the created project structure is shown in the figure below:
By default, we will create src/main/resources
According to Maven's specifications, Maven has 3 directories, namely:
src/main/java: java source file storage location
src/main/resource: resource resources, such as configuration files, etc.
src/test/java: Test the location of the source code file storage
However, when we create "src/main/java" or "src/test/java", we will prompt "The folder is already a source folder." as shown in the following figure:
However, when we searched in the directory, we found that the directory did not exist.
2. Solutions to Moven template bugs
The solution is as follows:
On the project, select [Properties], click [Java Build Path], and you can see in the Source tab that “/src/main/java” and “/src/test/java” are missing status, as shown in the figure below:
Choose to remove it and then recreate it, and there will be no error.