美文网首页
Springboot devtools热部署配置

Springboot devtools热部署配置

作者: 安易学车 | 来源:发表于2020-03-18 16:37 被阅读0次

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

    1、jar 包引入

            <dependency>

            <groupId>org.springframework.boot</groupId>

            <artifactId>spring-boot-devtools</artifactId>

            <optional>true</optional>

        </dependency>

    2、插件配置 需要设置fork为true属性

    <plugin>

            <groupId>org.springframework.boot</groupId>

            <artifactId>spring-boot-maven-plugin</artifactId>

            <configuration>

                <fork>true</fork>

              </configuration>

        </plugin>

    3、如果使用了模板thymeleaf,需设置不缓存,没有使用不需要配置

    spring.thymeleaf.cache=false

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

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

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

    相关文章

      网友评论

          本文标题:Springboot devtools热部署配置

          本文链接:https://www.haomeiwen.com/subject/bzlcyhtx.html