1、把maven項目import 進來(maven工程區導入) (全默認下一步就行了)
2、添加maven項目運行命令,把項目debug運行起來
3、也可與在終端窗口下,運行
在win的目錄下終端窗口
mvn tomcat7:run 或者 mvn tomcat7:depoly (熱部署)
在idea的終端
tomcat7:run 或者 tomcat7:depoly
4、jetty 容器熱部署
<plugin> <groupId>org.mortbay.jetty</groupId> <artifactId>jetty-maven-plugin</artifactId> <version>8.1.14.v20131031</version> <configuration> <scanIntervalSeconds>1</scanIntervalSeconds> <!-- 熱部署 --> <webApp> <contextPath>/</contextPath> <sessionHandler implementation="org.eclipse.jetty.server.session.SessionHandler"> <sessionManager implementation="org.eclipse.jetty.server.session.HashSessionManager"> <storeDirectory>${basedir}/target/sessions</storeDirectory> <idleSavePeriod>1</idleSavePeriod> </sessionManager> </sessionHandler> </webApp> </configuration> </plugin>
新聞熱點
疑難解答