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. iOS-数组,字典常用的字面量写法

    解决方法: //用字面量创建数组 NSArray *array = @[@"one",@"two"]; //用字面量创建字典 NSDictionary *dic ...

  2. 将BT转为磁力链接

    实战代码 安装完成后,我们来看下代码: 系统环境:Linux Python环境:Python2.7 请注意python版本 bt2url.py 1 2 3 4 5 6 7 8 9 10 11 12 1 ...

  3. c++ 类声明

    class B; struct A { B* ptr; }; class B { public: }; int main() { ; } A中定义了B的指针,所以要声明class B,在定义处于不完整 ...

  4. pycharm 授权/激活

    License server: http://elporfirio.com:1017/ http://idea.imsxm.com/

  5. 【BZOJ5063】旅游 Splay

    [BZOJ5063]旅游 Description 小奇成功打开了大科学家的电脑. 大科学家打算前往n处景点旅游,他用一个序列来维护它们之间的顺序.初 始时,序列为1,2,...,n. 接着,大科学家进 ...

  6. 解决scipy安装(pip install scipy)失败,以及其他问题

    解决scipy安装(pip install scipy)失败,以及其他问题 解决: 1.在scipy官方库中并没有适合Windows的python3.6相关版本,故需要在网址http://www.lf ...

  7. 2015-03-12——简析DOM2级样式

    CSSStyleSheet对象  表示某种类型的样式表CSSStyleRule对象  样式表中的每条规则 获得文档中的所有样式表document.styleSheets CSSStyleSheet对象 ...

  8. 原生js实现ajax方法

    下面是一个比较完整的Ajax function ajax(){ var ajaxData = { type:arguments[0].type || "GET", url:argu ...

  9. slurm使用

    官方文档:https://slurm.schedmd.com/ 用户命令cheatsheet:https://slurm.schedmd.com/pdfs/summary.pdf 占用GPU sall ...

  10. SAN,NAS,DAS的差别

    ※ 今天有空整理了下关于SAN.NAS,DAS相关的东西.和大家一起共享学习下,如有不正,还望多多包涵,多多指正. 在网络存储中,有着各种网络存储解决方式,比如:SAN.NAS,DAS存储网络.它们各 ...