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

相关推荐
哭哭啼5 小时前
pgSql 事务篇
java·数据库·postgresql
架构源启5 小时前
Spring AI进阶系列(17)- 未来展望与职业发展:Java 工程师迈向 AI 工程化与智能体架构的路线图
java·人工智能·spring
我登哥MVP5 小时前
Spring Boot 从“会用”到“精通”:SpringBoot MVC 请求处理全流程
java·spring boot·后端·spring·mvc·maven·intellij-idea
我登哥MVP5 小时前
Spring Boot 从“会用”到“精通”:ReturnValueHandler原理
java·spring boot·后端·spring·java-ee·maven·intellij-idea
snow@li5 小时前
数据库:MySQL vs PostgreSQL 详尽对比(2026版)
java·mysql·postgresql
丑过三八线5 小时前
Runc 深度解析:从原理到实操
java·linux·开发语言·docker·容器·rpc
STDD5 小时前
ntfy 自托管推送通知服务搭建:一条 curl 命令向手机发送通知
java·开发语言·智能手机
周末也要写八哥6 小时前
线程的生命周期之线程睡眠
java·开发语言·jvm
炸薯条!6 小时前
二叉树的链式表示(2)
java·数据结构·算法
徐寿春6 小时前
什么是数据倾斜
java·guava