Article Directory
1. Create an empty project
File -> New -> Project ->Empty Project to create an empty project
2. Idea configuration maven
File -> settings -> search for maven
(Local repository: local repository, the packages downloaded from the central warehouse can be found in this folder) to
solve the problem of slow construction of maven project creation
(because plug-in resources will be downloaded when the project is built. Makes the initial build time-consuming.
Solution : Set the VM options value in the Runner under Maven:-DarchetypeCatalog=internal
3. Create a Module based on
3.1 new -> Module Create a new maven-based module
3.2 Modify basic properties:
Shortcut key: ctrl+shift+alt+s to open the project structure and configure your own SDK
3.3 Modify the pom.xml configuration file
4. Create java and resources directory files under the main file of src
4.1 mark java as soureces root resource
java目录右键,make directory as ->sources root
Mark as soureces root resource
After marking, the java directory will turn into a blue box, and java class can be created
4.2 Then mark the resources directory as a Resources root file
resources ->make directory as ->Resources root