IDEA creates a Maven project and configures Tomcat

1. Configure the java environment

It can solve the flashback problem when tomcat starts
to configure JAVA_HOME
insert image description here

Configure the CLASSPATH variable value.;%JAVA_HOME%\lib\dt.jar;%JAVA_HOME%\lib\tools.jar;
insert image description here
configure the path
insert image description here
and enter java, javac, java -version in cmd

2. Configure Maven

Configure M2_HOME
insert image description here
configure MAVEN_HOME
insert image description here
configure path
insert image description here

3. Create a maven project in IDEA and deploy it on Tomcat

1. First create a maven project
2. Set maven information in the setting
insert image description here
3. Deploy on Tomcat
insert image description here
insert image description here
4. Set the basic information of Tomcat
insert image description here
5. Select the project to run
insert image description here
6. Start Tomcat
insert image description here

Guess you like

Origin blog.csdn.net/qq_40529151/article/details/122920824