spring boot 热部署

方法1(建议使用该方法):
首先下载springloaded-1.2.6.RELEASE.jar包,放到自己的目录,比如D盘
 
然后再Eclipse 选项中找到jdk配置,进入jdk设置,
找到Default VM arguments追加 -javaagent:D:springloaded-1.2.6.RELEASE.jar -noverify
 
然后运行main方法即可。
 
 
方法2:
 
pom文件中加入以下配置,如果存在build和plugins就只追加plugin的内容,
 
<build》
<plugins》
<plugin》
<groupId》org.springframework.boot</groupId》
<artifactId》spring-boot-maven-plugin</artifactId》
<dependencies》
<dependency》
<groupId》org.springframework</groupId》
<artifactId》springloaded</artifactId》
<version》1.2.6.RELEASE</version》
</dependency》
</dependencies》
</plugin》
</plugins》
</build》
 
注意:
启动的时候不是运行main方法了,要使用maven命令启动mvn spring-boot:run
对应Eclipse选项为 Run As --> Maven build --> 输入 spring-boot:run 
原文地址:https://www.cnblogs.com/wulm/p/8336473.html