版本:
Intellij IDEA 2017.3
1. 引入插件
引入熱加載的插件,springboot 1.3開始就有的...
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
</dependency>
project 中添加spring-boot-maven-plugin
,主要在eclipse中起作用,idea不需要加此配置。
SpringBoot 項(xiàng)目的話,應(yīng)該是有此配置,加 <configuration> 里面的內(nèi)容即可。
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<fork>true</fork>
</configuration>
</plugin>
</plugins>
</build>
2. IDEA(2017.3) 配置
- 點(diǎn)擊:
File-> Settings -> Build ,Execution,Deployment -> Compiler
Mac版IDEA,使用快捷鍵
command + ,
打開Preferences
定位到-> Build ,Execution,Deployment -> Compiler
Compiler.png
選中 Build project automatically
,然后點(diǎn)擊 OK
保存退出。
- 使用組合鍵:
Shift+ALT+Ctrl+/
,選擇Registry
,回車
Mac版
command + option +shift +/
Registry-01.png
Registry-02.png
搜索 complier.automake.allow.when.app.running
,找到后,勾選 ?? 退出即可。
- 禁用瀏覽器緩存
按F12(更多工具---->開發(fā)者工具),找到network,勾選Disable Cache。