在maven工程,pom.xml文件中project节点下添加如下代码:
<build>
<pluginManagement>
<plugins>
<!-- 配置Tomcat插件 -->
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.2</version>
<configuration>
<port>8082</port>
<path>/</path>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
如何启动?
Run As>Maven build
Goasl:----> tomcat7:run