IDEA中实现springboot热部署

IDEA中实现springboot热部署

热部署: 每一次修改代码后会自动更新,无需每次重启

依赖(pom.xml)

修改后记得Reload一下

xml 复制代码
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-devtools</artifactId>
    <scope>runtime</scope>
    <optional>true</optional>
</dependency>

application.properties

java 复制代码
# 热部署
spring.devtools.restart.enabled=true

settings

  1. 搜索Compiler,勾选 Build project automatically

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

加快热部署速度

现在SpringBoot就可以自动热部署了,效果还不错,但是感觉速度有点慢。
settings->Languages & Frameworks->Spring->Spring Boot

设置Refresh health in the Actuator tab ewver为1

相关推荐
南知意-1 分钟前
IDEA 2026.1最新版安装教程
java·ide·intellij-idea·idea安装·idea激活
星子落怀aa18 分钟前
Java 反复报错?Gemini助力修复
java
半夜修仙21 分钟前
RabbitMQ中如何保证消息的可靠性传输
java·分布式·中间件·rabbitmq·github·java-rabbitmq
Flittly23 分钟前
【AgentScope Java新手村系列】(3)工具系统
java·spring boot·spring
吴声子夜歌26 分钟前
Java——多线程编程技巧
java·多线程
AI行业学习39 分钟前
CC-Switch v3.16.1 官方下载 | 安装配置详细教程【2026.6.10】
java·开发语言·vue.js·python·mysql·eclipse·html
不负岁月无痕1 小时前
C++ 模板核心内容与高频面试题汇总
java·开发语言·c++
Flittly1 小时前
【AgentScope Java新手村系列】(2)第一个Agent-基础对话
java·spring boot·spring·ai
摇滚侠2 小时前
Spring MVC 不是一个单独的框架,是 Spring 框架的一个模块
java·spring·mvc
阿正的梦工坊2 小时前
【Rust】04-借用、引用与切片
java·数据库·rust