首页 > 编程知识 正文

SpringBoot 项目自动编译热部署立刻看到效果,maven项目如何自动编译

时间:2023-05-03 16:24:29 阅读:238389 作者:1126

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项目自动编译+热部署,这我们修改后的代码能够立刻看到效果,提高效率!


版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。