第一种:下载jetty插件
Help->Eclipse Marketplace
运行时配置访问路径及端口号
第二种:在pom.xml中配置jetty插件信息
<!-- maven 插件扩展clean jetty:run-war -->
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>9.2.18.v20160721</version>
<configuration>
<war>${project.basedir}/target/${artifactId}</war>
<httpConnector>
<port>8088</port>
</httpConnector>
<webAppConfig>
<contextPath>/${project.artifactId}</contextPath>
</webAppConfig>
</configuration>
</plugin>
运行时:run As–>maven build
第三种:配置tomcat
window->show view->other->servers->finish
来源:CSDN
作者:weixin_39919087
链接:https://blog.csdn.net/weixin_39919087/article/details/104538534