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

相关推荐
2601_962055974 小时前
跟据spring boot版本,查看对应的tomcat,并查看可支持的tomcat的版本范围
spring boot·后端·tomcat
EXI-小洲5 小时前
Java 操作 Word:字符串替换、图片插入、动态生成表格与API接口下载
java·开发语言·spring boot·word
2601_961901706 小时前
SpringBoot使用Nacos进行application.yml配置管理
java·spring boot·spring
何以解忧,唯有..6 小时前
LangChain 工具调用(Tool Calling)实战指南
java·前端·langchain
QQ_21696290967 小时前
【源码编号:project79475】SpringBoot校内二手交易平台:商品发布、分类检索、留言交流、订单管理全流程实战
java·spring boot·后端
前端 贾公子8 小时前
第09章:上下文与记忆 (2)
java·服务器·前端
2601_962203518 小时前
Java进阶07集合(续)
java·开发语言
郑州光合科技余经理8 小时前
本地生活服务系统:模块边界与结算字段怎么拆
java·开发语言·前端·后端·系统架构·uni-app·php
roman_日积跬步-终至千里9 小时前
【数据治理(6)】DataOps 不是调度工具,而是让数据产品长期可信的运行机制
java·服务器·网络
落魄大学生之流水线上谋生计9 小时前
LangGraph 基本用法指南
java·windows·python·langchain