zoukankan      html  css  js  c++  java
  • spring boot 热部署

    有两种方式:Devtools 和 SpringLoader

    <dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-devtools</artifactId>
    <optional>true</optional> <!-- 这个需要为 true 热部署才有效(不加也好使)-->
    </dependency>

    回到idea正常界面,Mac使用快捷键shift+option+command+/,window上的快捷键是Shift+Ctrl+Alt+/,打开Registry,勾选

    compiler.automake.allow.when.app.runningcompiler.automake.allow.when.app.running

    <build>
    <plugins>
    <plugin>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-maven-plugin</artifactId>
    <!--<configuration>-->(不加也好使)
    <!--<fork>true</fork> &lt;!&ndash;fork : 如果没有该项配置,肯呢个devtools不会起作用,即应用不会restart &ndash;&gt;-->
    <!--</configuration>-->
    </plugin>
    </plugins>
    </build>

    -----------------------------------------------------------------------------------------------------------------------------------
    SpringLoader->maven插件方式
    SpringLoader->lib方式
    springloader只能热部署后台代码
    devtools是自动重新部署。
  • 相关阅读:
    FileWriter简单用法并记录日志
    jquery 替换元素函数
    jquery ajax应用
    jquery 操作对象和集合
    jquery 管理包装元素集合
    jQuery 过滤选择器
    @Html.Action()
    ASP.NET MVC之Html.RenderAction
    MVC5中路由新特性
    MVC5学习整理
  • 原文地址:https://www.cnblogs.com/hongchengshise/p/10508368.html
Copyright © 2011-2022 走看看