文章目錄
- 1. 依賴
- 2. 開啟實時自動編譯
- 3. 開啟運作自動編譯開關
1. 依賴
<!-- 熱部署DevTools -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
</dependency>
2. 開啟實時自動編譯
3. 開啟運作自動編譯開關
具體步驟:同時按住Ctrl + Shift + Alt + /
- compiler.automake.allow.when.app.running -> 自動編譯
- compile.document.save.trigger.delay -> 自動更新檔案
PS:網上極少有人提到 File -> Settings -> Default Settings -> Build -> Compiler 然後勾選 Build project automatically 它主要是針對靜态檔案如JS CSS的更新,将延遲時間減少後,直接按F5重新整理頁面就能看到效果!