Foreword
In the past, we debugging web project, you need to download a local tomcat in order to reuse items for others to fast commissioning, start here demonstrate a web project with maven plug-in method
Add the following plug-in pom file
<plugins>
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.2</version>
<configuration>
<port>8080</port>
<path>/</path>
<uriEncoding>UTF-8</uriEncoding>
<server>tomcat7</server>
</configuration>
</plugin>
</plugins>
Port project with the path and the like can be configured
Run the following command to start
mvn tomcat7:run
Or click on the button idea sidebar plug-in maven
debugging
In this way the words can not start debugging source code, you can simply configure it.
Congigurations 1. Click Edit
2. Select button maven
project 3. Check to be executed, fill in the command to execute tomcat7: run
at this time the project can be started by normal start-up and debug the right of two buttons
Reference blog
[1]https://blog.csdn.net/MonkeyBrothers/article/details/79606127