mart1nN
V2EX  ›  Java

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

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