jetty插件实现 热部署
<plugin> <groupId>org.eclipse.jetty</groupId> <artifactId>jetty-maven-plugin</artifactId> <version>9.4.9.v20180320</version> <!--<groupId>org.mortbay.jetty</groupId>--> <!--<artifactId>maven-jetty-plugin</artifactId>--> <!--<version>6.1.10</version>--> <configuration> <!-- http://www.eclipse.org/jetty/documentation/current/jetty-maven-plugin.html --> <scanIntervalSeconds>0</scanIntervalSeconds> <!-- By Default, jetty start on port 8080 --> <httpConnector> <port>9092</port> </httpConnector> <systemProperties> <force>true</force> <systemProperty> <name>catalina.home</name> <value>${project.build.directory}/logs/</value> </systemProperty> </systemProperties> </configuration> </plugin>
实现不需要重启项目,而实现了修改代码后的更新
大道三千,条条皆可证道。道心不可失。