0%

SpringBoot项目开发热部署

SpringBoot项目开发热部署

devtools 热部署

1. 项目中引入依赖

1
2
3
4
5
6
<!-- devtools 热部署 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
</dependency>

2. IDEA 配置

在修改了类文件代码后,IDEA 不会自动编译,需开启 IDEA 配置。

  1. IntelliJ IDEA -> Perferences -> Build -> Compiler:Build project automatically
  2. IntelliJ IDEA -> Perferences -> Advanced Settings -> Allow auto-make to start even if developed application is currently running

JRebel插件实现热部署