zoukankan      html  css  js  c++  java
  • idea配置热部署

    第一步:添加依赖
    使用spring-boot-devtools提供的开发者工具
    spring-boot项目中引入如下依赖

    <dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-devtools</artifactId>
    </dependency>
    该方法基于类加载机制来实现热加载的,因此你修改完成代码后必须重新编译当前代码,才能触发热部署,Eclipse默认就支持了自动编译,而在Intellij IDEA中默认是关闭了自动编译的,可以按照如下2步设置开启:
    IDEA开启项目自动编译,进入设置,Build,Execut, Deployment -> Compiler 勾选中左侧的Build Project automatically
    IDEA开启项目运行时自动make, ctrl + shift + a搜索命令:registry -> 勾选compiler.automake.allow.when.app.running
    基于类加载机制来实现热加载的,因此你修改完成代码后必须重新编译当前代码,才能触发热部署,Eclipse默认就支持了自动编译,而在Intellij IDEA中默认是关闭了自动编译的,可以按照如下2步设置开启:
    1、IDEA开启项目自动编译,进入设置(ctrl+alt+s)—Build,Execution,Deployment> Compiler 勾选中左侧的Build Project automatically。

     

    2、IDEA开启项目运行时自动make, ctrl + shift + alt+/ 命令:registry -> 勾选。

    compiler.automake.allow.when.app.running
    优点:简单,支持Spring-boot项目,支持成员级别的修改热部署。
    缺点:只支持spring-boot项目。

    参考博客:https://www.cnblogs.com/jcook/p/6910238.html

  • 相关阅读:
    HDU4003 Find Metal Mineral
    POJ1125 Stockbroker Grapevine
    HDU4028The time of a day
    弱校ACM奋斗史
    POJ1236 Network of Schools
    HDU4004 The Frog's Games
    HDU4001 To Miss Our Children Time
    POJ2186 Popular Cows
    POJ1094 Sorting It All Out
    hadoop2.7.1单机和伪集群的搭建0
  • 原文地址:https://www.cnblogs.com/ming-blogs/p/10289075.html
Copyright © 2011-2022 走看看