1、添加热部署启动器(添加maven依赖)
<!--热部署启动器-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
</dependency>
2、配置自动编译:
File-Settings-Compiler-Build Project automatically
3、配置:应用程序运行时允许编译器自动生成:
3.1、 快捷键 ctrl + shift +a,打开后输入“registry”
3.2、勾选“Compiler autoMake allow when app running”: