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

相关推荐
Diligently_36 分钟前
Anolis 系统更新与密码设置&磁盘扩容
java·后端·spring
mqiqe1 小时前
线程调度与 Schedulers:Project Reactor 并发模型的核心引擎
java·开发语言·网络
我命由我123451 小时前
Android 开发问题:unexpected element <service> found in <manifest>
android·java·java-ee·android studio·android jetpack·android-studio·android runtime
正在走向自律1 小时前
飞算JavaAI能搞定充电站故障处置吗?
java·ai编程·java开发·飞算javaai·java代码生成·ai coding模型·springboo
用户40966601317511 小时前
Guava 不止有 Lists 和 Maps:Cache、EventBus、Multimap 实战
java·后端
一只叫煤球的猫2 小时前
从 Java 21 到 Java 25:ThreadLocal 以外的选择—— ScopedValue
java·后端·架构
步行cgn2 小时前
MyBatis 多对一关联映射详解
java
仍然.3 小时前
SpringCloud---Eureka介绍
java·spring cloud·eureka
霸道流氓气质3 小时前
Spring 事务同步机制 —— AfterTransactionActionCollector 的异步解耦原理
java·后端·spring
Lightpwd3 小时前
PostgreSQL jsonb 写入踩坑:一条 `\u0000` 如何让整批同步失败,还把异常伪装成“数据完整性冲突”
java