1、pom.xml中加入
<!--实现springboot 热部署-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
</dependency>
2、setting

3、IDEA 设置为在程序运行过程中,依然允许自动编译
ctrl + shift + alt + /,选择Registry,勾选勾上 Compiler autoMake allow when app running

打完收工 就是感觉热部署有点慢
本文介绍如何在SpringBoot项目中配置热部署,通过在pom.xml中添加spring-boot-devtools依赖,并在IDEA中启用自动编译功能,实现在程序运行过程中实时更新代码变更。

被折叠的 条评论
为什么被折叠?



