参考资源
Maven 配置
<!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-devtools --><dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devtools</artifactId> <optional>true</optional></dependency><build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <configuration> <fork>true</fork> </configuration> </plugin> </plugins></build>
IDEA 配置
- Preferences | Build, Execution, Deployment | Compiler 下的 【Build project automatically】打钩
- 快捷键 【Command+Option+Shift+/】 选择 “Registry” ,选中打勾 “compiler.automake.allow.when.app.running” 。