SpringBoot:使用spring-boot-devtools进行热部署以及不生效的问题解决

在idea上怎么才能使用Spring的热部署 

这里仅用Maven做介绍

(1)在Maven中添加依赖

SpringBoot:使用spring-boot-devtools进行热部署以及不生效的问题解决

(2)在插件配置

SpringBoot:使用spring-boot-devtools进行热部署以及不生效的问题解决

但是,为什么配置了还是没有用呢 ?!

这是因为idea默认是没有自动编译的,我们这里需要添加修改配置.打开设置

(1)File-Settings-Compiler-Build Project automatically

SpringBoot:使用spring-boot-devtools进行热部署以及不生效的问题解决

还有一点,按住以下快捷键,唤出 Registry

(2)ctrl + shift + alt + /,选择Registry,勾上 Compiler autoMake allow when app running

SpringBoot:使用spring-boot-devtools进行热部署以及不生效的问题解决

打上勾就OK了!

这里再贴一个博主的网页,写的挺好的!

https://blog.csdn.net/isea533/article/details/70495714