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. 第七篇:使用 fcntl 函数 获取,设置文件的状态标志

    前言 当打开一个文件的时候,我们需要指定打开文件的模式( 只读,只写等 ).那么在程序中如何获取,修改这个文件的状态标志呢? 本文将告诉你如何用 fcntl函数 获取指定文件的状态标志. 解决思路 1 ...

  2. 认识tornado(五)

    Tornado 自带了模板系统,模板语法与 Django 差异不大.这里简单地介绍如何使用 Tornado 的模板系统. 首先是编写 URL 规则与 Handler: 01 class NowaMag ...

  3. Delphi TreeView – 自动给标题上加图片

    Delphi TreeView – 自动给标题上加图片 当处理完TreeView控件树形结构的数据后,根据不同的树形节点Level,加上不同的图片. 图片的ImageList已经放置好,并且TreeV ...

  4. Jmeter--正则表达式提取值

    博客首页:http://www.cnblogs.com/fqfanqi/ 设置界面如下: Apply to:应用范围的选择: Field to check:检查的领域,即需要提取内容的地方. 下面是各 ...

  5. php 正则表达式二.基本语法

    官方手册正则语法:http://php.net/manual/zh/reference.pcre.pattern.syntax.php 正则表达式在线测试工具:regexpal 正则表达式的匹配先后顺 ...

  6. Java 之单例设计模式

    设计模式: 对问题行之有效的解决方式, 其实它是一种思想. 单例设计模式 解决的问题:就是可以保证一个类在内存中的对象唯一性. 即单个实例. 比如对于A 和 B 两个程序使用同一个配置信息对象时, A ...

  7. 事件对象event之e.targtet || e.srcElement

    p.onclick = function (event) { var e = event || window.event, target = e.target ? e.target : e.srcEl ...

  8. WTForms In Flask(WTForms在Flask中的应用)

    WTForms WTForms是一个支持多个web框架的form组件,主要用于对用户请求数据进行验证. 安装wtforms : pip3/pip install wtforms 用户登录/注册示例 项 ...

  9. 科班学习java遇到瓶颈,每天云里雾里怎么办?

    声明:这个问题困扰了我好久,今天在知乎找到了答案.知乎链接https://www.zhihu.com/question/24240982,感谢大神@Tony He的回答. 作者:Tony He链接:h ...

  10. django(python manage.py migrate)同步数据库出错后的解决办法

    执行python manage.py migrate同步数据库前一次执行 python manage.py makemigrations 时生成的文件及之后所有的文件删除即可,然后修改models.p ...