Springboot devtools热部署配置

Springboot devtools的热部署配置总共有三步html

一、jar 包引入java

<dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-devtools</artifactId>
        <optional>true</optional>
    </dependency>

二、插件配置 须要设置fork为true属性spring

<plugin>
         <groupId>org.springframework.boot</groupId>
         <artifactId>spring-boot-maven-plugin</artifactId>
         <configuration>
             <fork>true</fork>
          </configuration>
     </plugin>

三、若是使用了模板thymeleaf,需设置不缓存,没有使用不须要配置缓存

spring.thymeleaf.cache=false

四、IntelliJ IDEA工具的设置,有两个地方app

(1)File-Settings-Compiler-Build Project automaticallymaven

(2)ctrl + shift + alt + /,选择Registry,勾上 Compiler autoMake allow when app runningspring-boot

亲测可用,若有问题,请留言,谢谢工具

参考博客 http://www.javashuo.com/article/p-tabntbsa-gc.htmlui

相关文章
相关标签/搜索