欢迎访问悦橙教程(wld5.com),关注java教程。悦橙教程  java问答|  每日更新
页面导航 : > > 文章正文

SpringBoot3.x全新的热部署配置方式详解(IntelliJIDEA2023.1),

来源: javaer 分享于  点击 30850 次 点评:96

SpringBoot3.x全新的热部署配置方式详解(IntelliJIDEA2023.1),


今天在暨大给学生上课的时候,发现在 Spring Boot 项目中配置热部署的方式有一丢丢的改变,具体往下看。

最近还把 IDEA 更新到了 IntelliJ IDEA 2023.1 版本

在这里插入图片描述

第一步,在 pom.xml 文件中添加依赖

<!--热部署配置 -->
 <dependency>
     <groupId>org.springframework.boot</groupId>
     <artifactId>spring-boot-devtools</artifactId>
     <!-- 表示依赖不向下传递 -->
     <optional>true</optional>
 </dependency>

第二步,配置 Build project automatically

如果你用的是 Windows 系统,请按照 file -> settings -> Build, Execution, Deployment -> compiler 这个路径找到 build project automatically 并勾上,最后 Apply 和 OK 即可;

如果你用的是 Mac 系统,请按照 IntelliJ IDEA -> settings -> Build, Execution, Deployment -> compiler 这个路径找到 build project automatically 并勾上,最后 Apply 和 OK 即可。

在这里插入图片描述

第三步,开启允许在运行中修改文件

如果你用的是 Windows 系统,请按照 file -> settings -> Advanced Settings 这个路径找到 Allow auto-make to start even if developed application is currently running 并勾上,最后 Apply 和 OK 即可;

如果你用的是 Mac 系统,请按照 IntelliJ IDEA -> settings -> Advanced Settings 这个路径找到 Allow auto-make to start even if developed application is currently running 并勾上,最后 Apply 和 OK 即可;

在这里插入图片描述

到此这篇关于Spring Boot 3.x 全新的热部署配置方式(IntelliJ IDEA 2023.1)的文章就介绍到这了,更多相关Spring Boot 3.x 热部署配置内容请搜索3672js教程以前的文章或继续浏览下面的相关文章希望大家以后多多支持3672js教程!

您可能感兴趣的文章:
  • Idea2022版本配置SpringBoot热部署的教程
  • idea配置springboot热部署终极解决办法(解决热部署失效问题)
  • idea+ springboot热部署的配置方法
  • Springboot在IDEA热部署的配置方法
  • Spring Boot 配置 IDEA和DevTools 热部署的方法
相关栏目:

用户点评