热部署成功之后,每次修改文件其实还是要等待几秒的,这个跟电脑的配置有关系,多刷新几次看看。
-
引入依赖
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devtools</artifactId> <scope>runtime</scope> <optional>true</optional> </dependency>
-
修改配置文件
# application.yaml spring: devtools: restart: enabled: true thymeleaf: cache: false
-
开启IDEA自动构建项目