1.pom.xml
????<dependency>? ??
? ? ????<groupId>org.springframework.boot</groupId>
? ? ????<artifactId>spring-boot-devtools</artifactId>
? ? ????<optional>true</optional>
? ? ????<scope>true</scope>
????</dependency>
????<plugin>? ??
? ? ????<groupId>org.springframework.boot</groupId>
? ? ????<artifactId>spring-boot-maven-plugin</artifactId>
? ??????<configuration>
?? ? ? ? ? ?<fork>true</fork>
????????</configuration>
????</plugin>
2.IDEA配置

Build project automatically

查看Registry快捷鍵(option + command + SHIFT + /)

使用快捷鍵設(shè)置Registry
yml文件中添加:
devtools:
????restart:
????????enabled: true
完成后即可實現(xiàn)熱部署功能。