1.在pom文件中添加
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
</dependency>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<fork>true</fork>
</configuration>
</plugin>
2.設置spring.freeemarker.cache=false
3.file--setting
4.hepl--find action 輸入Registry... 設置compiler.automake.allow.when.app.running
5.重啟idea
完成上面的步驟就可以方便使用啦,不用每次修改個東西都要重啟程序了