intellij import maven project

1. [File] -> [new] -> [Project from existing source ...] choose their own local directory to import the project.

2. Select [maven] project, the configuration of the machine JDK, click [Environment settings]

3. Select the local download of the maven settings.xml file, then next to the default.

 

4. Shortcuts ctrl + alt + shift + s recall Project Structure window, select Facets [] [] Artifacts, spring and where the web are configured.

 

5. Select the right project, maven reimport.

6. Do mvn clean package in the terminal window, compile successfully.

7. Configure tomcat, click [add configuration], click the + sign, select tomcat server.

8. Configure different port number and the server port to run the page, because a project can only intellij run a tomcat, therefore, at the same time separate port area to run multiple projects.

9. In the Deployment page, add Artifact, select exploded. Fill in the context path nginx Service Application, correspondence.

 

10. Finally, click tomcat run the project, do not forget to add a service path in server.xml manually.

 

Guess you like

Origin www.cnblogs.com/cyydmlrs520/p/11360835.html