zoukankan      html  css  js  c++  java
  • Springboot 热部署

    Springboot 热部署

    注意以下的热部署方式在IDEA是默认没有打开自动编译的,手动编译需要快捷键(Ctrl+Shift+F9),自动编译的修改配置如下:(注意刷新不要太快,会有1-2秒延迟)  File-Settings-Compiler-Build Project automatically

    一、第一种 spring-boot-devtools

    1.在pom.xml添加依赖

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

    2.添加配置

      1) “File” -> “Settings” -> “Build,Execution,Deplyment” -> “Compiler”,选中打勾 “Build project automatically” 。

      2) 组合键:“Shift+Ctrl+Alt+/” ,选择 “Registry” ,选中打勾 “compiler.automake.allow.when.app.running” 。

    二、第二种 spring-loaded

    在Plugins中添加依赖

    <build>
            <plugins>
                <plugin>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-maven-plugin</artifactId>
                    <dependencies>
                        <!-- spring热部署 -->
                        <dependency>
                            <groupId>org.springframework</groupId>
                            <artifactId>springloaded</artifactId>
                            <version>1.2.6.RELEASE</version>
                        </dependency>
                    </dependencies>
                </plugin>
            </plugins>
        </build>

      // 如果依赖提示not found,先在上面写让maven下载下来,再移到Plugin里面来

  • 相关阅读:
    操盘策略:判断强庄股的四个诀窍
    三类股有望继续走强
    操盘策略:股市空头陷阱五大招数
    每日一招:面对亏损我们应该如何操作(鳄鱼法则)
    (转)一个大户的自白:我是这样被两融打爆的
    3.2、迭代
    3.1、切片
    2.4、递归函数
    2.3、函数的参数
    2.2、定义函数
  • 原文地址:https://www.cnblogs.com/jokejie/p/12732655.html
Copyright © 2011-2022 走看看