广告
返回顶部
首页 > 资讯 > 后端开发 > Python >Idea2022版本配置SpringBoot热部署的教程
  • 488
分享到

Idea2022版本配置SpringBoot热部署的教程

2024-04-02 19:04:59 488人浏览 薄情痞子

Python 官方文档:入门教程 => 点击学习

摘要

目录2022版本配置SpringBoot热部署1.idea版本2. 添加依赖3.更改IDEA设置2022版本配置springBoot热部署 网上搜到的以前版本的都是更改ReGIStr

2022版本配置springBoot热部署

网上搜到的以前版本的都是更改ReGIStry...,勾选compiler.automake.allow.when.app.running,然后新版的IDEA的Registry...里没有这个选项,最后找到了解决方案,亲测有效,链接如下:

ref: In IntelliJ 2021.2 compiler.automake.allow.when.app.running disappear. Unable to enable live reload under Spring Boot

1.IDEA版本

在这里插入图片描述

2. 添加依赖

  • 如果只有一个项目,直接在pom.xml里添加下面所有的即可
  • 父项目pom.xml<project>标签内添加:
<build>
       <plugins>
           <plugin>
               <groupId>org.springframework.boot</groupId>
               <artifactId>spring-boot-Maven-plugin</artifactId>
               <version>2.6.4</version>
               <executions>
                   <execution>
                       <Goals>
                           <goal>repackage</goal>
                       </goals>
                   </execution>
               </executions>
               <configuration>
                   <fork>true</fork>
                   <addResources>true</addResources>
               </configuration>
           </plugin>
       </plugins>
   </build>

子项目pom.xml<dependencie>标签内添加,注意要在父项目xml里定义版本:

 <dependency>
           <groupId>org.springframework.boot</groupId>
           <artifactId>spring-boot-devtools</artifactId>
           <scope>runtime</scope>
           <optional>true</optional>
       </dependency>

3.更改IDEA设置

preferences... -> Compiler

在这里插入图片描述

preferences... -> Advanced Settings -> Allow auto-make to start even if developed application is currently running

在这里插入图片描述

到此这篇关于Idea2022版本配置SpringBoot热部署的教程的文章就介绍到这了,更多相关idea配置springboot热部署内容请搜索编程网以前的文章或继续浏览下面的相关文章希望大家以后多多支持编程网!

--结束END--

本文标题: Idea2022版本配置SpringBoot热部署的教程

本文链接: https://www.lsjlt.com/news/146078.html(转载时请注明来源链接)

有问题或投稿请发送至: 邮箱/279061341@qq.com    QQ/279061341

本篇文章演示代码以及资料文档资料下载

下载Word文档到电脑,方便收藏和打印~

下载Word文档
猜你喜欢
软考高级职称资格查询
编程网,编程工程师的家园,是目前国内优秀的开源技术社区之一,形成了由开源软件库、代码分享、资讯、协作翻译、讨论区和博客等几大频道内容,为IT开发者提供了一个发现、使用、并交流开源技术的平台。
  • 官方手机版

  • 微信公众号

  • 商务合作