当前位置:网站首页>IDEA 热部署(热加载)
IDEA 热部署(热加载)
2022-07-24 00:48:00 【同学潘】
引言:
当我们在idea中创建spring boot项目,项目运行后,每次修改代码就又要重新启动项目,这样就很不方便所以我们可以在idea中进行
热部署,也就是热加载,它可以自动帮开发者重启spring boot项目,以达到修改代码之后能够“实时”的看到新效果的目的——说是“实时”,其实也是需要时间的
添加热部署框架支持
如果是新项目的话,则直接添加即可
如果是已经存在的项目,则请参考️准备工作—添加 lombok 到项目中
开启 IDEA 的自动编译
此步骤需要设置idea的两个settings,一个是当前项目的settings,另一个是新项目的settings,具体截图如下:

开启运行中的热部署
不同的版本配置不同,配置分为
2021.2之前版本的配置和2021.2版本之后的配置。
配置idea2021.2之前的版本
点击下面图中的那个搜索按钮
或者直接双击shift键

配置idea2021.2之后的版本

启动项目使用 debug,而不是 run 运行
由于有的用run和debug都可以实现热部署,而有的只能使用debug才能实现,所以推荐使用debug

经过以上设置之后,修改代码了就不用自己频繁重新启动项目了,它自己检测到代码变动了自己就重启项目了
边栏推荐
- Pbootcms database conversion tutorial (SQLite to MySQL detailed tutorial)
- 采坑websocket總結
- First knowledge of C language functions
- MySQL data query (select)
- English grammar_ Demonstrative pronoun - so
- 通信模块整理(二)HC-05
- AVX instruction set accelerated matrix multiplication
- Leetcode set the intersection size to at least 2
- Semaphore
- High number_ Chapter 2 differential calculus of multivariate functions__ Geometric application of partial derivatives_ Tangent and normal plane of space curve
猜你喜欢

Image processing 1:rgb888_ YCbCr444

Difference between data index and label system of data warehouse

The postman test interface has 404 or 500 errors when the URL is configured correctly

数据标准详细概述-2022

Detailed explanation of data warehouse standard -2022

Flutter | the easiest way to add header and footer to listview

Expérience du système réseau: résoudre les problèmes de ping

Problem note - unable to open include file: "direct.h": no such file or directory

Development of main applet for business card traffic near the map

Summary of polynomial commitment schemes
随机推荐
XXL job realizes the code parsing of email sending warnings (line by line code interpretation)
js的相关知识
Beifeng communication appeared in China (Xiamen) emergency exhibition | intelligent communication means are strong and eye-catching!
Customize an object
书写SQL必养成的好习惯
Inode, soft link, hard link
Table custom table encapsulation
Interviewer: if the order is not paid within 30 minutes after it is generated, it will be automatically cancelled. How to realize it?
A good habit to develop when writing SQL
win10下基于anaconda的detectron2安装
C language: deep analysis of const keyword
EFCore高级Saas系统下单DbContext如何支持不同数据库的迁移
Image processing 1:rgb888_ YCbCr444
Coloring old photos - deoldify get started quickly
Communication module sorting (II) hc-05
Bean Validation自定义容器验证篇----06
Sed in-depth understanding and use
JS drag and drop element
Reverse linked list drawing demonstration
English grammar_ Demonstrative pronoun -such / the same