idea 配置springboot 热部署

1. 增加依赖

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
</dependency>

 

2. 开启热部署支持

<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<!--fork:设置True,否则可能devtools不会起作用-->
<fork>true</fork>
</configuration>
</plugin>

 

3. 测试

  • mvn spring-boot:run启动工程
  • 修改代码
  • Ctl+s保存代码,Ctl+F9编译
  • 查看到新的结果
posted @ 2019-11-08 09:56  李明0517  阅读(133)  评论(0)    收藏  举报