idea开启springboot的devtools自动热部署功能
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自动热部署功能的更多相关文章
- SpringBoot配置devtools实现热部署
spring为开发者提供了一个名为spring-boot-devtools的模块来使Spring Boot应用支持热部署,提高开发者的开发效率,无需手动重启Spring Boot应用. devtool ...
- SpringBoot 4.SpringBoot 整合 devtools 实现热部署
一.添加 devtools 依赖 <!-- Spring boot 热部署 : 此热部署会遇到 java.lang.ClassCastException 异常 --> <!-- op ...
- SpringBoot 整合 devtools 实现热部署
来源:https://www.cnblogs.com/rcddup/p/7533125.html 一.添加 devtools 依赖 <!-- Spring boot 热部署 : 此热部署会遇到 ...
- 第4章 springboot热部署 4-1 SpringBoot 使用devtools进行热部署
/imooc-springboot-starter/src/main/resources/application.properties #关闭缓存, 即时刷新 #spring.freemarker.c ...
- IDEA+DevTools实现热部署功能
开发IDE: Intellij IDEA 2018.1 SpringBoot:1.5.9.RELEASE 热部署 大家都知道在项目开发过程中,常常会改动页面数据或者修改数据结构,为了显示改动效果, ...
- idea springBoot 配置devtools实现热部署
1.pom文件依赖引入 <dependencies> <dependency> <groupId>org.springframework.boot</grou ...
- (40). springboot + devtools(热部署)【从零开始学Spring Boot】
我们之前在在()Spring Boot热部署[从零开始学Spring Boot] (http://412887952-qq-com.iteye.com/blog/2291518 )讲过通过使用spri ...
- SpringBoot开发 - 什么是热部署和热加载?devtool的原理是什么?
在SpringBoot开发调试中,如果我每行代码的修改都需要重启启动再调试,可能比较费时间:SpringBoot团队针对此问题提供了spring-boot-devtools(简称devtools)插件 ...
- springboot在eclipse实现热部署
eclipse使用spring-tool-suite插件创建springboot项目,项目创建完成后. 选中项目,右键 Spring Tools --> Add Boot Devtools 点 ...
随机推荐
- 升级个人网站框架组件IBatisNet+Castle
<sqlMap namespace="Sequence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance& ...
- 每一行最后添加文字python脚本
比较简单的在pycharm上跑的脚本 #_*_coding:utf-8_*_ #普通版 file = open("oldfile.txt","r",newlin ...
- 《JAVA多线程编程核心技术》 笔记:第三章:线程间通信
一. 等待/通知机制:wait()和notify()1.1.使用的原因:1.2 具体实现:wait()和notify()1.2.1 方法wait():1.2.2 方法notify():1.2.3 wa ...
- python的三元运算
python的三元运算是先输出结果,再判定条件.其格式如下: >>> def f(x,y): return x - y if x>y else abs(x-y) #如果x大于y ...
- Linux文档编辑 vim
- git 学习(一)初始化和提交
git 学习(一) 创建git版本库 $ mkdir gitstudy $ cd gitstudy $ git init nitialized empty Git repository in /Use ...
- Java基础 - 面向对象 - 类方法传参
调用方法时可以给该方法传递一个或多个值,传给方法的值叫实参,在方法内部,接收实参的变量叫做形参,形参的声明语法与变量的声明语法一样.形参只在方法内部有效. Java中方法的参数主要有3种,分别为值参数 ...
- linux库冲突解决方法 apt purge / aptitude purge
remove libs: [apt-get purge remove] or [aptitude purge] how to use apt-get and aptitude https://blog ...
- python用whl文件安装包
直接用pip安装包的时候有时会因为许多奇怪的原因安装失败,这时就需要祭出大杀器——whl文件 python3 -m pip install whl文件路径名 whl库:https://www.lfd. ...
- 【Linux】Ubuntu下录屏&&制作GIF
在做Android的时候,想制作GIF用来演示效果.一番摸索.找到了一个简单可行的办法: App在模拟器中执行,用录屏软件录制.再将视频转成GIF. 系统: Ubuntu 15.04 录屏软件: Re ...