吴志勇的博客 吴志勇的博客
  • h5

    • HTML5&CSS3
  • scss

    • css预处理语言
  • JavaScript

    • JavaScript教程
    • Ajax
    • ES6教程
    • NodeJS
    • Typescript
  • 框架

    • Jquery
    • VUE
    • React
  • Swing专题
  • java基础
  • javaweb
  • 框架
  • 数据库
  • netty
  • 设计模式
  • 微服务及架构
  • 云原生
  • maven
  • 单元测试
工具
我的
  • 分类
  • 标签
  • 归档
GitHub (opens new window)

吴志勇

......
  • h5

    • HTML5&CSS3
  • scss

    • css预处理语言
  • JavaScript

    • JavaScript教程
    • Ajax
    • ES6教程
    • NodeJS
    • Typescript
  • 框架

    • Jquery
    • VUE
    • React
  • Swing专题
  • java基础
  • javaweb
  • 框架
  • 数据库
  • netty
  • 设计模式
  • 微服务及架构
  • 云原生
  • maven
  • 单元测试
工具
我的
  • 分类
  • 标签
  • 归档
GitHub (opens new window)
  • 运维

    • linux&shell
    • Docker教程
    • git
    • Jenkins教程
    • 正则表达式
    • 一键打包到linux环境
    • vmvare安装虚拟机集群
    • kubesphere部署nacos
    • Vmware安装centos7后网络配置
    • Certbot与Nginx配置SSL证书及自动续签指南
  • VSCode的使用
  • idea热部署
    • 1. spring-boot-devtools
    • 2. Jrebel
  • vscode+github图床
  • 旧笔记本安装pve+黑群晖
  • 使用阿里云容器镜像服务
  • nvm管理nodejs
  • ollma
  • 虚拟机挂载CentOS挂载本地目录
  • 老毛子Padavan安装应用
  • docker安装firecrawl并使用
  • Python使用UV指南
  • huggingface部署n8n
  • n8n使用飞书作为数据存储
  • frp内网穿透以及服务化
  • 工具
wuzhiyong
2024-09-11

idea热部署

我的idea版本是2023,其他版本可能略有不同

# 1. spring-boot-devtools

  1. 需要在项目中添加热部署依赖,pom.xml中添加如下
<!--依赖中添加-->   
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-devtools</artifactId>
    <scope>runtime</scope>
    <optional>true</optional>
</dependency>

<!--build模块中添加-->
<build>
	<plugins>
		<plugin>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-maven-plugin</artifactId>
			<version>1.5.9.RELEASE</version>
			<configuration>
                <fork>true</fork><!--重点是这里-->
                <addResources>true</addResources>
            </configuration>
		</plugin>
	</plugins>
</build>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
  1. 需要修改项目配置文件,允许项目进行热部署,示例中是yml文件 spring: devtools: restart: enabled: true

  2. 修改idea配置 file->settings->Advanced Settings

    img

  3. file->settings->Builds,Execution,Deployment->Compiler

    ​ img

    1. 重启idea后即可实现热部署

# 2. Jrebel

  1. idea插件中心下载插件
  2. 激活工具下载 (opens new window)
  3. 运行如下图

image-20240928124605722

  1. 激活界面填入http://127.0.0.1:8888/{GUID},邮箱随便填

image-20240928124836426

上次更新: 2024-09-29 11:22:28

← VSCode的使用 vscode+github图床→

Copyright © 2020-2025 wuzhiyong
  • 跟随系统
  • 浅色模式
  • 深色模式
  • 阅读模式