一、pom引入
1、tomcat7
<!-- tomcat7 --> ?<plugin> ?????<groupId>org.apache.tomcat.maven</groupId> ?????<artifactId>tomcat7-maven-plugin</artifactId> ?????<version>2.2</version> ?????<configuration> ?????????<useBodyEncodingForURI>true</useBodyEncodingForURI> ?????????<path>/</path> ?????</configuration> ?</plugin> ?
使用
tomcat7:run -Dmaven.tomcat.port=8080 ?
2、jetty
<!-- jetty --> ?<plugin> ?????<groupId>org.mortbay.jetty</groupId> ?????<artifactId>jetty-maven-plugin</artifactId> ?????<version>7.6.15.v20140411</version> ?????<configuration> ?????????<useTestClasspath>true</useTestClasspath> ?????????<webAppConfig> ?????????????<contextPath>/</contextPath> ?????????</webAppConfig> ?????</configuration> ?</plugin> ?
使用
jetty:run -Djetty.port=8081 ?
008-插件方式启动web服务tomcat,jetty
原文地址:https://www.cnblogs.com/bjlhx/p/9740045.html