在pom.xml中加上一个插件,端口设为8081,:<build> <plugins> <plugin> <groupId>org.apache.tomcat.maven</groupId> <artifactId>tomcat7-maven-plugin</artifactId> <version>2.2</version> <configuration> <port>8081</port> <path>/</path> </configuration> </plugin> </plugins></build>
转载于:https://www.cnblogs.com/wanyi/p/10325954.html