一、引入starter
//熱部署
compile("org.springframework.boot:spring-boot-devtools")
- 1
- 2
二、開啓自動編譯
第一步
windows:ctrl + alt + shift + /
mac: command + alt + shift + /
- 1
- 2
- 3
彈出以下界面
第二步
點擊Registry,勾選compiler.automake.allow.when.app.running
第三步
勾選 Make/Build project automatically
重新運行項目,隨意改一個java類,看看項目是不是重啓了^_^