Intellij Idea + spring-boot + thymleaf实现热部署

maven设置

<!-- hot swapping, disable cache for template, enable live reload -->
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-devtools</artifactId>
    <optional>true</optional>
</dependency>

spring设置

然后在application.propeties中添加spring.thymeleaf.cache = false

Intellij idea中的设置

  • File –> Setting –> Build, Execution, Deployment –> Compiler –> check this Build project automatically

  • Press SHIFT+CTRL+A (Win/Lin) or Command+CTRL+A (Mac) to open a pop-up windows, type registry

  • Find and check this option compiler.automake.allow.when.app.running

    原文作者:bowang
    原文地址: https://segmentfault.com/a/1190000009488038
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞