SpringBoot项目热部署配置

1、IDEA配置

File—Settings—Compiler
在这里插入图片描述

2、Ctrl+Shift+Alt+?选择Registry…

在这里插入图片描述

3、选择compier.automake. allow.when.app.running

在这里插入图片描述
再次打开会变成蓝色
在这里插入图片描述

4、SpringBoot项目配置

在需要进行热部署的SpringBoot应用中添加依赖

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-devtools</artifactId>
</dependency>

不用指定版本,会有默认的版本
在这里插入图片描述

5、配置SpringBoot的Maven插件

在这里插入图片描述

6、配置SpringBoot应用的变化更新策略

在这里插入图片描述
选择Update classes and resources 再点击Apply
在这里插入图片描述
如果电脑配置不高,不建议配置热部署

猜你喜欢

转载自blog.csdn.net/qq_42042158/article/details/121647697