• idea+springboot+freemarker热部署


    第一步:在maven中加入devtools的依赖(这里我使用的是maven来管理项目) 

                <plugin>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-maven-plugin</artifactId>
                    <configuration>
                        <fork>true</fork>
                        <!-- 该配置必须-->
                    </configuration>
                </plugin>
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-devtools</artifactId>
                <optional>true</optional>
                <!-- optional=true,依赖不会传递,该项目依赖devtools;之后依赖myboot项目的项目如果想要使用devtools,需要重新引入 -->
            </dependency>

    第二步:在application.properties中设置禁用模板引擎缓存

    spring.freemarker.cache=false
    spring.freemarker.settings.template_update_delay=0

    第三步:修改IDEA的设置

    1. 打开 Settings –> Build-Execution-Deployment –> Compiler,将 Build project automatically.勾上。
    2. 点击 Help –> Find Action..,或使用快捷键 Ctrl+Shift+A来打开 Registry…,将其中的compiler.automake.allow.when.app.running勾上。   

      注:compiler.automake.allow.when.app.running 由于列表很长,不太好找。但是有个规律,他们是根据a、b、c字母进行排序的 ,根据这个规律仔细找就能找到了。

        

    3. 全部设置完毕,重启一下IDEA。现在你就不必每次都手动的去点停止和启动了
  • 相关阅读:
    【模板】扩展中国剩余定理(EXCRT)
    战略游戏(树形DP)
    二叉苹果树(树形DP)
    货车运输(最大生成树,LCA)
    [CQOI2016]密钥破解
    Pollard-Rho算法andMiller_Rabin算法
    [TJOI2009]猜数字(中国剩余定理)
    中国剩余定理(学习笔记)
    线段树 Segment Tree
    辗转相除法
  • 原文地址:https://www.cnblogs.com/shiyalong/p/8167817.html
Copyright © 2020-2023  润新知