1.ctrl+Shift+Alt+/—–> 选择Registry ——>勾选
compiler.automake.allow.when.app.running
2.如果你进行上面的设置没有作用,请在检查下面图片的设置
Setting—>Compiler—>勾选Build project automatically
3.maven 加入依赖
<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> <!-- 如果没有该配置,devtools不会生效 --> </configuration> </plugin>
转:https://blog.youkuaiyun.com/u013042707/article/details/78648259