【原】IDEA热部署设置

热部署的概念:在应用正在运行的时候升级软件,却不需要重新启动应用。对于Java应用程序来说,热部署就是在运行时更新Java类文件。

注意:经过试验,IDEA 2017可以使用热部署,IDEA 14不行。

步骤1、springboot 1.3.x开始有热部署功能,在pom.xml文件中添加如下内容

1 <dependency>
2 <groupId>org.springframework.boot</groupId>
3 <artifactId>spring-boot-devtools</artifactId>
4 <optional>true</optional>
5 </dependency>

步骤2、IDEA中配置如下内容

1) "Settings"----->"Build,Execution,Deplyment"----->"Compiler"(或者ctrl+alt+A,输入Compiler),勾选"Build project automatically"
2) ctrl+alt+A,输入"Registry",勾选"compiler.automake.allow.when.app.running"
3)Chrome浏览器禁用缓存,F12或者"Ctrl+Shift+I",打开开发者工具,"Network“选项卡中勾选"Disable Cache(while DevTools is open)"

猜你喜欢

转载自www.cnblogs.com/iflytek/p/9006518.html
今日推荐