Spring Boot - 热部署Devtools

mac2022-06-30  22

不得不说,热部署在开发中真的非常实用,不用在改动之后频繁地重启项目。

开始配置,首先,引入pom依赖

<!-- 热部署 --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devtools</artifactId> <optional>true</optional> <scope>runtime</scope> </dependency>

idea需要修改几个地方:

File > Settings > Compiler > Build Project automatically,勾选自动编译

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

顶部菜单 > Edit Configurations,修改项目更新策略

最新回复(0)