1、pom.xml中添加:
<!--spring boot热部署--> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devtools</artifactId> <optional>true</optional> </dependency>
2、设置IDE,idea ,File->Settings-> Build-Execution-Deployment -> Compiler 勾选 Build Project Automatically.
3、ctrl + shift + alt + /,选择Registry,勾上 Compiler autoMake allow when app running
4、可以换值测试了
本文介绍如何通过在pom.xml中添加spring-boot-devtools依赖并配置IDEA来实现Spring Boot项目的热部署。具体步骤包括添加依赖、设置IDEA自动编译、启用运行时自动编译。
449

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



