mart1nN
V2EX  ›  Java

IDEA Spring Boot 项目内置 Tomcat 启动,有没有什么办法更新类或静态文件的时候不需要重新启动。自动部署好像失效了

  •  
  •   mart1nN · Sep 3, 2019 · 6722 views
    This topic created in 2618 days ago, the information mentioned may be changed or developed.
    20 replies  •  2019-09-04 10:27:18 +08:00
    jsy123392550
    jsy123392550
    Sep 3, 2019❤️1
    1
    jrebel
    cuixiaoyan
    cuixiaoyan
    Sep 3, 2019
    2
    luckyqiang
    luckyqiang
    Sep 3, 2019
    3
    @jsy123392550 一直没搞懂这东西到底怎么用
    MattMin
    MattMin
    Sep 3, 2019
    4
    1 楼说得对
    yinzhili
    yinzhili
    Sep 3, 2019
    5
    只更新静态资源的话,Ctrl+F9 就可以。更新类那就要结合 jrebel 了。
    jsy123392550
    jsy123392550
    Sep 3, 2019
    6
    @luckyqiang 网上教程一大堆 你随便搜都搜得到
    liangkang1436
    liangkang1436
    Sep 3, 2019
    7
    一楼说了我想说的
    glaucus
    glaucus
    Sep 3, 2019❤️1
    8
    spring-boot-devtools ?这个虽然也会重新启动,但是采用了双类加载器机制,整个过程很快
    lff0305
    lff0305
    Sep 3, 2019
    9
    试过 jrebel, springboot dev tools 还有 DCE VM。
    体验下来 JRebel 是最好的(偶尔有异常或者不能重载入)。DCE VM 次之(比较麻烦,需要 patch jvm.dll )。SpringBoot DevTools 最差(前面两个能处理的很多情况不能处理)
    jorneyr
    jorneyr
    Sep 3, 2019
    10
    感觉 springboot dev tools 就是残的,不应该叫热加载,应该叫热启动,效率完全不是一个数量级的。
    rqxiao
    rqxiao
    Sep 3, 2019
    11
    spring-boot-devtools 用 redis 的时候 还会报 classnotfound 异常
    w292614191
    w292614191
    Sep 3, 2019
    12
    spring-boot-devtools 这个东向每次都会帮你重启,然后你刷新页面就要重新登录,开发中真是吐血。
    Jrebel 是真的舒服,上班到下班都不需要重启一次。
    yzmm
    yzmm
    Sep 3, 2019
    13
    所以说你设置了 SpringBoot 的 On 'Update' action 和 On frame deactivation 为 Update classes and resources 都不行吗?
    rqxiao
    rqxiao
    Sep 3, 2019
    14
    借问下 使用了下 jrebel,新增方法或者新增参数 不能热加载吗
    fmumu
    fmumu
    Sep 3, 2019 via Android
    15
    @rqxiao 可以的
    Takamine
    Takamine
    Sep 3, 2019
    16
    IDE 不是在启动的配置项那里可以直接配置吗。
    1424659514
    1424659514
    Sep 4, 2019
    17
    @jsy123392550 同 jrebel, 但是我用 jrebel debug 的时候经常失效, 具体的表现就是打了断点, 但是不能再断点处停下, 直接执行完了整个程序
    rqxiao
    rqxiao
    Sep 4, 2019
    18
    @fmumu 额 我好像没有试出来哎
    rqxiao
    rqxiao
    Sep 4, 2019
    19
    @fmumu 我再仔细看看
    jsy123392550
    jsy123392550
    Sep 4, 2019
    20
    @1424659514 没有出现过你这种情况 你确定你 debug 的时候 jrebel 已经热更新了吗
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   3070 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 59ms · UTC 12:16 · PVG 20:16 · LAX 04:16 · JFK 07:16
    ♥ Do have faith in what you're doing.