参考资源

Maven 配置

  1. <!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-devtools -->
  2. <dependency>
  3. <groupId>org.springframework.boot</groupId>
  4. <artifactId>spring-boot-devtools</artifactId>
  5. <optional>true</optional>
  6. </dependency>
  7. <build>
  8. <plugins>
  9. <plugin>
  10. <groupId>org.springframework.boot</groupId>
  11. <artifactId>spring-boot-maven-plugin</artifactId>
  12. <configuration>
  13. <fork>true</fork>
  14. </configuration>
  15. </plugin>
  16. </plugins>
  17. </build>

IDEA 配置

  1. Preferences | Build, Execution, Deployment | Compiler 下的 【Build project automatically】打钩
  2. 快捷键 【Command+Option+Shift+/】 选择 “Registry” ,选中打勾 “compiler.automake.allow.when.app.running” 。