1. 添加依赖
<!-- 热部署 --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devtools</artifactId> <optional>true</optional> </dependency>
2. IDEA设置开启热部署
步骤1:相关偏好里开启自动编译
步骤2:Shift+Ctrl+Alt+/,选择Registry
选 compiler.automake.allow.when.app.running ,重启项目就可以了(不用重启IDEA)
备注:eclipse里面不用设置,只需要添加依赖就可以实现热部署了
来源:https://www.cnblogs.com/enjoyjava/p/11729250.html