1、先在pom文件中添加下面代码段

<!-- 热部署 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
<scope>true</scope>
</dependency> ---------------------------------------------------- <build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<!-- 没有该配置,devtools 不生效 -->
<fork>true</fork>
<addResources>true</addResources>
</configuration>
</plugin>
</plugins>
</build>

2、需要修改idea中的两个配置,来开启idea自动编译功能

1 - Enable Automake from the compiler

PRESS: CTRL + SHIFT + A
TYPE: make project automatically
PRESS: Enter
Enable Make Project automatically feature

2 - Enable Automake when the application is running

PRESS: CTRL + SHIFT + A

TYPE: Registry
Find the key compiler.automake.allow.when.app.running and enable it

意思是

1、CTRL + SHIFT + A --> 查找make project automatically --> 选中

2、CTRL + SHIFT + A --> 查找Registry --> 找到并勾选compiler.automake.allow.when.app.running

如果不想做上面这两部勾选,不想让idea开启自动编译部署,那么手动按Ctrl+F9也是可以的,开启这两项在添加springboot应用时,会找不到主类,需要去掉勾选后才能好用,所以idea是不建议开启这两项的,除非springboot已经运行好了,不然建议去掉勾选后再进行添加

idea开启springboot的devtools自动热部署功能的更多相关文章

  1. SpringBoot配置devtools实现热部署

    spring为开发者提供了一个名为spring-boot-devtools的模块来使Spring Boot应用支持热部署,提高开发者的开发效率,无需手动重启Spring Boot应用. devtool ...

  2. SpringBoot 4.SpringBoot 整合 devtools 实现热部署

    一.添加 devtools 依赖 <!-- Spring boot 热部署 : 此热部署会遇到 java.lang.ClassCastException 异常 --> <!-- op ...

  3. SpringBoot 整合 devtools 实现热部署

    来源:https://www.cnblogs.com/rcddup/p/7533125.html 一.添加 devtools 依赖 <!-- Spring boot 热部署 : 此热部署会遇到 ...

  4. 第4章 springboot热部署 4-1 SpringBoot 使用devtools进行热部署

    /imooc-springboot-starter/src/main/resources/application.properties #关闭缓存, 即时刷新 #spring.freemarker.c ...

  5. IDEA+DevTools实现热部署功能

      开发IDE: Intellij IDEA 2018.1 SpringBoot:1.5.9.RELEASE 热部署 大家都知道在项目开发过程中,常常会改动页面数据或者修改数据结构,为了显示改动效果, ...

  6. idea springBoot 配置devtools实现热部署

    1.pom文件依赖引入 <dependencies> <dependency> <groupId>org.springframework.boot</grou ...

  7. (40). springboot + devtools(热部署)【从零开始学Spring Boot】

    我们之前在在()Spring Boot热部署[从零开始学Spring Boot] (http://412887952-qq-com.iteye.com/blog/2291518 )讲过通过使用spri ...

  8. SpringBoot开发 - 什么是热部署和热加载?devtool的原理是什么?

    在SpringBoot开发调试中,如果我每行代码的修改都需要重启启动再调试,可能比较费时间:SpringBoot团队针对此问题提供了spring-boot-devtools(简称devtools)插件 ...

  9. springboot在eclipse实现热部署

    eclipse使用spring-tool-suite插件创建springboot项目,项目创建完成后. 选中项目,右键 Spring Tools  --> Add Boot Devtools 点 ...

随机推荐

  1. Android中Bitmap、Drawable、byte[]转换

    public byte[] getBitmapByte(Bitmap bitmap){ ByteArrayOutputStream out = new ByteArrayOutputStream(); ...

  2. sublime text 3 并列显示

    alt+shift+1:显示一列 alt+shift+2:显示二列 alt+shift+3:显示三列 ......

  3. [LintCode] 两个排序数组的中位数

    class Solution { public: /** * @param A: An integer array. * @param B: An integer array. * @return: ...

  4. PAT 1014 Waiting in Line (模拟)

    1014. Waiting in Line (30) 时间限制 400 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue Suppo ...

  5. Django设置中文,和时区、静态文件指向

    #========================================================== # 设置时区 注意注释上面的:LANGUAGE_CODE.TIME_ZONE.U ...

  6. 【论文翻译】MobileNets: Efficient Convolutional Neural Networks for Mobile Vision Applications

    MobileNets: Efficient Convolutional Neural Networks for Mobile Vision Applications 论文链接:https://arxi ...

  7. Logstash Reference Getting started with Logstash

    进阶功能_Logstash_数据采集_用户指南_日志服务-阿里云 https://help.aliyun.com/document_detail/49025.html Logstash Referen ...

  8. QTimeLine 控制动画(一步一步的往前变化,并在每次变化时都会发出一个frameChanged信号)

    QTimeLine顾名思义表示一条时间线,即一个时间序列,该时间序列会按我们实现定义好的间隔一步一步的往前变化,并在每次变化时都会发出一个frameChanged()信号.所以,我们通常会使用该类来驱 ...

  9. .net ASPxTreeList 使用手记

    ASPxTreeList在使用ASPxGridViewExporter控件做导出时,如果指定文件名是中文时会乱码可以用以下方法解决: grvExporter为ASPxGridViewExporter控 ...

  10. CNI flannel插件

    // plugins/meta/flannel/flannel.go func cmdAdd(args *skel.CmdArgs) error 调用n, err := loadFlannelNetC ...