SpringBoot项目在IntelliJ IDEA中实现热部署

spring-boot项目热部署idea工具:

(1)、pom文件引入:都需要为true

<!-- 热部署模块 -->
<dependency>
   <groupId>org.springframework.boot</groupId>
   <artifactId>spring-boot-devtools</artifactId>
   <optional>true</optional> <!-- 这个需要为 true 热部署才有效 -->
</dependency>


<plugin>
   <groupId>org.springframework.boot</groupId>
   <artifactId>spring-boot-maven-plugin</artifactId>
   <configuration>
      <fork>true</fork>
   </configuration>
</plugin>

(2)、idea编译器设置file→setting→compiler

SpringBoot项目在IntelliJ IDEA中实现热部署

(3)idea设置

快捷键ctrl+alt+shift  /

SpringBoot项目在IntelliJ IDEA中实现热部署

勾选SpringBoot项目在IntelliJ IDEA中实现热部署

重启项目即可生效。亲测有效。