第一步:在pom.xml中加入依赖
<!--热部署--> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devtools</artifactId> <optional>true</optional> </dependency>
第二步:系统设置
在File - Setting - Build,Execution,Deployment - Complier -Build project automatically 勾上
然后,Ctrl + Shift + Alt + / ,如下图:
找到 compiler.automake.allow.when.app.running 勾上