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. STL中的排序算法

    本文转自:STL中的排序算法 1. 所有STL sort算法函数的名字列表: 函数名    功能描述 sort   对给定区间所有元素进行排序 stable_sort 对给定区间所有元素进行稳定排序 ...

  2. Leetcode-Permuation Sequence

    The set [1,2,3,…,n] contains a total of n! unique permutations. By listing and labeling all of the p ...

  3. css的常用知识点

    一.css的引入方式 1.行内引入 直接在标签中定义样式 <p style="background-color: red">test</p> 2.嵌入式引入 ...

  4. 转!java自定义注解

    转自:http://blog.csdn.net/yixiaogang109/article/details/7328466  Java注解是附加在代码中的一些元信息,用于一些工具在编译.运行时进行解析 ...

  5. python多线程的两种写法

    1.一般多线程 import threading def func(arg): # 获取当前执行该函数的线程的对象 t = threading.current_thread() # 根据当前线程对象获 ...

  6. Linux学习笔记(10)linux网络管理与配置之一——主机名与IP地址,DNS解析与本地hosts解析(1-4)

    Linux学习笔记(10)linux网络管理与配置之一——主机名与IP地址,DNS解析与本地hosts解析 大纲目录 0.常用linux基础网络命令 1.配置主机名 2.配置网卡信息与IP地址 3.配 ...

  7. 教你高速入门Excel-宏与VBA(续)

    版权声明:本文为博主原创文章,未经博主同意不得转载. https://blog.csdn.net/small_baby01/article/details/24028407 引言         通过 ...

  8. node.js---sails项目开发(6)--- 实现分页功能

    只需要添加一个文件即可  api/blueprints/find.js     代码如下 /** * Module dependencies */ var util = require('util') ...

  9. 在windows上搭建redis集群

    一 所需软件 Redis.Ruby语言运行环境.Redis的Ruby驱动redis-xxxx.gem.创建Redis集群的工具redis-trib.rb 二 安装配置redis redis下载地址   ...

  10. django 快速数据库操作,不用SQL语句

    配置models文件 # -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import mod ...