一.前言
注意以下的热部署方式在IDEA是默认没有打开自动编译的,下面通过使用spring-boot-devtools的方式实现热部署。
二.开始使用
1.poml.xml加入
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
</dependency>
2.设置以下两项
1) “File” -> “Settings” -> “Build,Execution,Deplyment” -> “Compiler”,选中打勾 “Build project automatically” 。
2) 组合键:“Shift+Ctrl+Alt+/” ,选择 “Registry” ,选中打勾 “compiler.automake.allow.when.app.running”