maven tomcat插件好像無法進行熱部署,jetty可以如下配置實現熱部署,但是idea無法進行自動編譯,所以需要如下快捷鍵
- Ctrl+Shift+F9,編譯
- Ctrl+F9,生成項目
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>8.1.1.v20120215</version>
<configuration>
<scanIntervalSeconds>1</scanIntervalSeconds><!-- 多少秒進行一次熱部署 -->
<webApp>
<contextPath>/wp</contextPath>
</webApp>
<connectors>
<connector implementation="org.eclipse.jetty.server.nio.SelectChannelConnector">
<port>80</port>
</connector>
</connectors>
</configuration>
</plugin>