在pom.xml中添加:
<plugin> <groupId>org.apache.tomcat.maven</groupId> <artifactId>tomcat7-maven-plugin</artifactId> <version>2.2</version> <configuration> <port>8089</port> <uriEncoding>UTF-8</uriEncoding> <server>tomcat7</server> </configuration> </plugin>