idea热部署Devtools
1.在需要热部署的项目插入依赖
<!--热部署-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
2.添加maven插件 在父类进行配置
<build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <configuration> <fork>true</fork> <addResource>true</addResource> </configuration> </plugin> </plugins> </build>
3.设置idea自动编译
4.在maven插件的pom.xml文件按住shift+ctrl+alt+点击register
5.重启即可