版本:
Intellij IDEA 2017.3
1. 引入插件
引入熱加載的插件嫌松,springboot 1.3開(kāi)始就有的...
<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 + ,
打開(kāi)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(更多工具---->開(kāi)發(fā)者工具)凑保,找到network冈爹,勾選Disable Cache。