在IDEA中启动Spring项目

岁酱吖の 提交于 2020-04-11 16:21:56

在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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!