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
Start with the above manner, then can not debug the source code, you can simply configure it.
1. Click on Edit Congigurations
2. Select the button maven 3. Select the project to be executed, fill in the command to execute tomcat7: run At this point the project can be started by normal start-up and debug the right of two buttons Run a web project is so fast, tomcat configuration change is also very easy.