第一步:添加依赖
在要添加热部署的Maven项目中的pom.xml文件中添加依赖
org.springframework.boot
spring-boot-devtools
第二步:勾选Build project automatically
第三步:
1、按两次shift键两次
2、搜索Registry,然后点击进去
3、勾选compiler.automake.allow.when.app.running
作用
在编译代码时自动运行,不需要我们手动编译运行,大大的提高了效率
特点
热部署的时间会比正常启动更快,随着业务的增加,启动时间会变长,这个差距会越明显