1.创建maven项目,并使用webapp骨架,并修改pom.xml文件
<build>
<finalName>myWebApp</finalName>
<!-- 配置tomcat插件,web端 -->
<plugins>
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<configuration>
<path>/app</path>
<port>8080</port>
</configuration>
</plugin>
</plugins>
</build>