本文非原创,转载自https://blog.csdn.net/qq_43466788/article/details/122741734
1.添加依赖
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
</dependency>
2.IDEA配置
在setting中找到Compiler勾选Build project automatically然后应用,我的是中文版的,图如下
找Help的Find Action,即’查找操作’,输入registry
然后选择compiler.automake.allow,when.app.running
最后重启项目。