Intellij idea 配置热部署
1. 采用外部tomcat的配置
1)打开右上角Run的Edit Configuration进入Tomcat配置选项页面
2)将On frame deactivation选项更改为 Update classes and resources
2. 采用springboot自带tomcat
1)pom.xml文件
注:热部署功能spring-boot-1.3开始有的
<!--添加依赖-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<!-- optional=true,依赖不会传递,该项目依赖devtools;之后依赖myboot项目的项目如果想要使用devtools,需要重新引入 -->
<optional>true</optional>
</dependency>
注:project 中添加 spring-boot-maven-plugin,主要在eclipse中使用,idea中不需要添加此配置。
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<fork>true</fork>
<!-- 静态资源 -->
<addResources>true</addResources>
</configuration>
</plugin>
</plugins>
</build>
2) 更改idea配置
1) “File” -> “Settings” -> “Build,Execution,Deplyment” -> “Compiler”,选中打勾 “Build project automatically” 。
2) 组合键:“Shift+Ctrl+Alt+/” ,选择 “Registry” ,选中打勾 “compiler.automake.allow.when.app.running” 。
3) 重新rebuild项目
3) Chrome禁用缓存
F12或者“Ctrl+Shift+I”,打开开发者工具,“Network” 选项卡下 选中打勾 “Disable Cache(while DevTools is open)”
Intellij idea 配置热部署的更多相关文章
- Intellij IDEA 4种配置热部署的方法【转】【补】
热加载 热加载可以使代码修改后无须重启服务器,就可以加载更改的代码.(其实分java和非java代码,本处可以让java代码立即生效且不重启服务) 第1种:修改服务器配置,使得IDEA窗口失去焦点时, ...
- jrebel配置热部署参数
jrebel配置热部署参数: -noverify -agentpath:D:/jrebel/lib/jrebel64.dll -Drebel.dirs=E:/workspace/item/src/ma ...
- springboot项目:以run as-->spring boot app方式启动,配置热部署(亲测可用!!!)
1.在pom.xml中添加热部署依赖 <!-- 热部署 --> <!-- devtools可以实现页面热部署(即页面修改后会立即生效, 这个可以直接在application.prop ...
- springboot 配置热部署 及 热部署后依旧是404的坑
springboot配置热部署的教程网上一大堆: 个人喜欢这种方式: https://www.cnblogs.com/winner-0715/p/6666579.html 本文主要强调的是,大家如果配 ...
- Intellij IDEA 4种配置热部署的方法
热部署可以使的修改代码后,无须重启服务器,就可以加载更改的代码. 第1种:修改服务器配置,使得IDEA窗口失去焦点时,更新类和资源 菜单Run -> EditConfiguration , 然后 ...
- springboot系列四、配置模板引擎、配置热部署
一.配置模板引擎 在之前所见到的信息显示发现都是以 Rest 风格进行显示,但是很明显在实际的开发之中,所有数据的显示最终都应该交由页面完成,但是这个页面并不是*.jsp 页面,而是普通的*.html ...
- idea配置热部署
第一步:添加依赖使用spring-boot-devtools提供的开发者工具spring-boot项目中引入如下依赖 <dependency><groupId>org.spri ...
- SpringBoot 配置热部署
做个记录,以免忘记: 1. 在 pom.xml 文件中的 dependencies 标签以内添加组件 devtools,具体内容如下: <!-- SpringBoot 热部署组件 devtool ...
- SpringBoot 使用IDEA 配置热部署
在开发中稍微更改一点内容就要重启,很麻烦.这个时候使用Spring Boot的热部署就能解决你的问题. 上图: 1,在pom.xml文件中添加依赖: <dependency> <gr ...
随机推荐
- 为javascript设置默认参数值
javascript(js)中如何为函数设置默认参数值,下面提供几种方法供参考. 第一种方法: function example(a,b){ var a = arguments[0] ? argume ...
- javascript链式语法
因为 jQuery 库的缘故,链式语法在前端界变得非常流行.实际上这是一种非常容易实现的模式.基本上,你只需要让每个函数返回 'this',这样其他函数就可以立即被调用.看看下面的例子. var bi ...
- 002-Go通过ioutil 读写文件
1.读取文件内容 package main import( "io/ioutil" "fmt" ) func main(){ b,err := ioutil.R ...
- java.lang.ClassNotFoundException: SparkPi$$anonfun$1
出现这个错误可能有两种情况,Jar文件没有传上去,或者Build Path里面包含的Jar文件和Spark的运行环境有冲突. 对于第一种情况,需要在SparkConf语句后面加上Jar文件的路径: v ...
- LIST OF NOSQL DATABASES [currently 150]
http://nosql-database.org Core NoSQL Systems: [Mostly originated out of a Web 2.0 need] Wide Column ...
- 解决 ERROR in native method: JDWP No transports initialized, jvmtiError=AGENT_ERROR_TRANSPORT_INIT(197)
在/etc/hosts文件中加入下面一行内容 127.0.0.1 localhost.localdomain localhost
- Maven项目目录结构与自动创建maven目录
Maven项目有特定的目录结构: 如图,我们在创建一个maven工程时,在项目根目录下有三大内容:main.test.pom.xml. 其中:main文件夹下是项目的主要源代码,按照包路径来存放 te ...
- 转 configure: error: Cannot find ldap.h
检查下面是不是已经安装,如果没有安装之:检查:yum list openldapyum list openldap-devel安装 :yum install openldap yum install ...
- CentOS7下 简单安装和配置Elasticsearch Kibana Filebeat 快速搭建集群日志收集平台
目录 1.添加elasticsearch官网的yum源 2.Elasticsearch 安装elasticsearch 配置elasticsearch 启动elasticsearch并设为开机启动 3 ...
- Dockerfile 构建google-chrom应用
cat Dockerfile.chrome FROM centos MAINTAINER zh******ech.cn ENV LANG en_US.UTF-8 RUN /bin/cp /usr/sh ...