IDEA热部署配置
来源:互联网 发布:js window.scrollbars 编辑:程序博客网 时间:2024/06/14 21:29
一、开启idea自动make功能
1、CTRL + SHIFT + A --> 查找make project automatically --> 选中
2、CTRL + SHIFT + A --> 查找Registry --> 找到并勾选compiler.automake.allow.when.app.running
最后重启idea
二、使用spring-boot-1.3开始有的热部署功能
1、加maven依赖
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devtools</artifactId> <optional>true</optional></dependency>
2、开启热部署
<build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <configuration> <fork>true</fork>//该配置必须 </configuration> </plugin> </plugins></build>
三、Chrome禁用缓存
F12(或Ctrl+Shift+J或Ctrl+Shift+I)--> NetWork --> Disable Cache(while DevTools is open)
至此,在idea中就可以愉快的修改代码了,修改后可以及时看到效果,无须手动重启和清除浏览器缓存。
测试方法:
1.修改类-->保存:应用会重启
2.修改配置文件-->保存:应用会重启
3.修改页面-->保存:应用会重启,页面会刷新(原理是将spring.thymeleaf.cache设为false)
不能使用分析:
1.对应的spring-boot版本是否正确,我这里使用的是1.5.3.RELEASE版本;
2.是否加入plugin了,以及属性<fork>true</fork>
3.Intellij IDEA是否开启了Make Project Automatically。
4.如果设置SpringApplication.setRegisterShutdownHook(false),则自动重启将不起作用。
阅读全文
0 0
- IDEA热部署配置
- idea配置SpringBoot热部署
- intellij idea 热部署 jrebel 详细配置
- intellij idea 热部署 jrebel 详细配置
- intellij idea 热部署 jrebel 详细配置
- Intellij IDEA 15.0.2 热部署配置
- intellij idea tomcat热部署配置
- idea 热部署 jrebel 详细配置
- Intellij IDEA配置tomcat热部署
- 配置idea 热部署 jrebel插件
- IDEA Spinrg boot 热部署配置
- idea react 热部署的另一个配置
- idea配置非maven项目配置及热部署配置
- Idea 实现热部署
- Idea 实现热部署
- IntelliJ IDEA热部署
- idea 热部署问题
- idea热部署
- 机器学习和深度学习入门问题形象解答
- 线性代数 02.05 矩阵习题课
- 切换至tab_2通讯录界面时有一部分位置闪黑屏
- MFC 防止多线程卡死
- 社会工程学工具集
- IDEA热部署配置
- SQL注入详解
- Opencv+Zbar二维码识别(标准条形码/二维码识别)
- PS最新版工具下载地址
- 分布式实时日志分析解决方案ELK部署架构
- Json知识点学习
- ES6新特性:使用export和import实现模块化
- 算法的一些小栗子10(回溯算法)
- IPython 交互式shel介绍与安装.