[SSM-Environment Setup] Create a web environment based on the maven project

1. Create an empty project

File -> New -> Project ->Empty Project to create an empty project

Insert picture description here

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
Insert picture description here
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

Insert picture description here


3. Create a Module based on

3.1 new -> Module Create a new maven-based module
Insert picture description here
Insert picture description here
3.2 Modify basic properties:
Insert picture description here
Shortcut key: ctrl+shift+alt+s to open the project structure and configure your own SDK

Insert picture description here
3.3 Modify the pom.xml configuration file
Insert picture description here


4. Create java and resources directory files under the main file of src

Insert picture description here

4.1 mark java as soureces root resource

java目录右键,make directory as ->sources rootMark as soureces root resource

Insert picture description here
After marking, the java directory will turn into a blue box, and java class can be created

Insert picture description here

4.2 Then mark the resources directory as a Resources root file

resources ->make directory as ->Resources root

Insert picture description here

5. The maven project was created successfully

Insert picture description here

Guess you like

Origin blog.csdn.net/qq_40542534/article/details/108679691