百度百科:热部署,就是应用正在运行的时候就可以升级软件,而不需要重新启动应用。
spring-loaded
- 依赖
org.springframework springloaded 1.2.5.RELEASE
ps:据说此方法还需要手动编译(
Ctrl + Shift + F9),请亲测!
spring-boot-devtools
- 依赖
org.springframework.boot spring-boot-devtools true
JRebel
- 安装插件
安装插件
安装插件
- 激活JRebel
激活JRebel
- 启动运行
启动运行
- 若不起效
不起效
不起效
全局配置
全局配置
全局配置
对比
| 方式 | 效果 |
|---|---|
| spring-loaded | 需手动编译 |
| spring-boot-devtools | 会重新加载整个应用 |
| JRebel | 只加载修改类(当有错误时不会)。无需手动编译,不会重新加载整个应用 |
参考文章
SpringBoot初始教程之热部署(五)
JRebel无限制版
IntelliJ IDEA 热部署插件 JRebel 安装激活及使用
intellij idea 热部署 jrebel 详细配置