Springboot项目热部署的几种方式
1、添加依赖
//gradle热部署
compile ('org.springframework.boot:spring-boot-devtools')
//Maven热部署
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
</dependency>
2、IDEA自动编译设置
1、设置File ->Setting ->Compile:

2、快捷键ctrl + shift + a 搜索命令:registry 勾选compiler.automake.allow.when.app.running

3、修改默认build
1、点击Edit Configurations…

2、选择Update classes and resources 或者Update resources,选中默认的Build,删除,点击+号选择Build Artifacts




3、如果没有Build Artifacts,设置File ->Project Structure->Artifacts ,点击+添加




本文详细介绍了SpringBoot项目实现热部署的多种方法,包括添加spring-boot-devtools依赖、配置IDEA自动编译及修改默认构建设置等关键步骤,助力开发者高效开发。

5339

被折叠的 条评论
为什么被折叠?



