步骤一:添加依赖
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devtools</artifactId> <optional>true</optional> </dependency>
步骤二:application.yml文件中添加一下配置
spring:
devtools:
restart:
enabled: true #是否开启开发者工具(true/false)
# additional-paths: src/main/java
exclude: static/**,WEB-INF/view/** #针对这个目录下的文件
步骤三:
1,File-Settings-Compiler-Build Project automatically(勾选)
2,ctrl + shift + alt + /,选择Registry,勾上 Compiler autoMake allow when app running(勾选)