在开发时,修改类或页面不需要进行重启服务才能生效被称为“热部署”,SpringBoot通过简单配置就可以实现:
<!--热部署-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
<scope>true</scope>
</dependency>
但是,在Intellij IEDA中热部署却失败了,
原因:IDEA默认情况下不会自动编译,设置一下即可,一共分两步:
步骤1:

步骤2:按住 Shift+Ctrl+Alt+/,选择Registry
这样就可以了!!