SpringBoot热部署(IDEA)
2021-08-29 本文已影响0人
Laity_9c91
Springboot热部署只需4步,即可
1. 在pom.xml中加载如下热部署依赖
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
2. 点击IDEA设置,勾选如图中的"Build project automatically",点击Ok

3. 在IDEA中使用快捷键" Ctrl+Shift+Alt+/ ",如下图:

4. 进入之后,勾选即可

到此热部署配置成功,修改代码之后无需重启项目点击保存之后,在浏览器上刷新页面即可