如何开启热部署
方便调试,提高开发效率(开发时使用,生产环境关闭)
一、添加架包
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
二、添加插件到聚合父类总工程中
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<fork>true</fork>
<addResources>true</addResources>
</configuration>
</plugin>
</plugins>
</build>
三、开启自动编译权限
四、热部署开启
- 键入Ctrl + Shift + Alt + / ,打开Registry
- 勾选:actionSystem.assertFocusAccessFromEdt
- 勾选:compiler.automake.allow.when.app.running
五、重新启动idea