1、pom.xml中增加的配置
<build>
<finalName>PaymentDemo</finalName>
<pluginManagement>
<plugins>
<!-- 配置Tomcat插件 -->
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.2</version>
<configuration>
<port>8080</port>
<path>/PaymentDemo</path>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
2、启动
3、在浏览器的地址栏输入地址:http://localhost:8080/PaymentDemo/