1:在pom.xml 中 配置
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devtools</artifactId> <optional>true</optional> </dependency>
注意:并不是pom.xml 的<build>标签中
2: 如果有页面的话 禁止页面缓存
spring: application: name: XXX aop: proxy-target-class: true thymeleaf: cache: false prefix: classpath:/templates/ mode: LEGACYHTML5
3:开idea工具的自动编译功能
完成以上步骤 即可实现SpringBoot项目自动编译+热部署,这我们修改后的代码能够立刻看到效果,提高效率!
本文介绍如何通过配置spring-boot-devtools模块及IDEA工具实现SpringBoot项目的自动编译与热部署,有效提升开发效率。

182

被折叠的 条评论
为什么被折叠?



