1.POM內建
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
</dependency>
2.IDEA工具啟動自動編譯功能

3.IDEA 設定為在程式運作過程中,依然允許自動編譯
操作: ctrl + shift + alt + /,選擇Registry,勾選勾上 Compiler autoMake allow when app running