Idea实现SpringBoot DevTools热部署

导入jar包

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

idea 勾上自动编译或者手动重新编译

File > Settings > Compiler-Build Project automatically

idea 注册

按 ctrl + shift + alt + / > Registry > 勾选Compiler autoMake allow when app running

设置自动加载资源配置和编译

具体如图: