在IDEA中启动Spring项目
1.在pom.xml中添加:
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>9.4.5.v20170502</version>
<configuration>
<scanIntervalSeconds>10</scanIntervalSeconds>
<httpConnector>
<port>8080</port>
</httpConnector>
<!-- 访问路径 -->
<webApp>
<contextPath>/</contextPath>
</webApp>
</configuration>
</plugin>
2.新建一个运行配置:选择Maven,在command line 中:填写 jetty:run
来源:oschina
链接:https://my.oschina.net/langwanghuangshifu/blog/3229193