热部署在Eclipse和IDEA里面的使用

热部署在Eclipse和IDEA里面的使用

简介:讲解热部署的使用注意事项,在eclipse里面默认开启,在IDE里面默认关闭

增加依赖

1
2
3
4
5
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
</dependency>

eclipse热部署默认自动开启

idea里面要设置

相关偏好里开启自动编译

File >>> Settings >>> Build,Execution,Deployment >>> Compiler

勾选 Build project automatically

Shift+Ctrl+Alt+/,选择Registry

勾选 compiler.automake.allow.when.app.running

参考链接