1.添加jetty的maven插件
<plugin> <groupId>org.mortbay.jetty</groupId> <artifactId>maven-jetty-plugin</artifactId> <version>6.1.26</version> <configuration> <connectors> <connector implementation="org.mortbay.jetty.nio.SelectChannelConnector"> <port>8080</port> </connector> </connectors> <scanIntervalSeconds>10</scanIntervalSeconds> </configuration> </plugin>
2.在Intell Idea中配置:
Run/Debug Configuration中add 一个maven configuration:
指定项目工程路径,goals设置为jetty:run,同时不要忘记在General和Runner中设置maven路径和jdk
3.启动debug即可
时间: 2024-10-13 08:50:30