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

  • 相关阅读:
    自动部署基于Maven的war文件到远程Tomcat
    解决Eclipse中新创建的Maven项目不自动创建web.xml文件
    JFreeChart
    hibernate
    hibernate
    hibernate
    hibernate
    Hibernate
    hibernate关联关系映射详解
    Hibernate获取数据java.lang.StackOverflowError
  • 原文地址:https://www.cnblogs.com/ming-blogs/p/10289075.html
Copyright © 2011-2022 走看看