SpringBoot热部署
步骤一:在SpringBoot项目中找到pom.xml文件,添加以下内容:
<!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-devtools -->
<!--热部署配置-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<version>2.5.0</version>
</dependency>
步骤二:IDEA设置热部署配置
(1)File - - >Setings- - >Compiler,勾选Build project automaticall

(2)按Shift+Ctrl+Alt+/选择Registry

(3)勾选compiler.automake.allow.when.app.running

本文介绍了如何在SpringBoot项目中启用热部署功能,通过在pom.xml添加spring-boot-devtools依赖,并在IDEA中进行相应设置,实现代码修改后自动编译更新,提高开发效率。
870

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



