Intellij IDEA 热部署的功能突然不好使了 - V2EX
ithrows
V2EX    Java

Intellij IDEA 热部署的功能突然不好使了

  •  
  •   ithrows Dec 11, 2017 8237 views
    This topic created in 3074 days ago, the information mentioned may be changed or developed.
    每次修改完静态资源得重新打包才能看到效果,之前不需要打包或者重新发布就能看到效果的。感觉是因为设置错了 IDEA 的部署方式导致的,有大神知道原因吗?
    20 replies    2019-07-31 13:10:50 +08:00
    chenguoyu
        1
    chenguoyu  
       Dec 11, 2017
    update classes and resources
    ithrows
        2
    ithrows  
    OP
       Dec 11, 2017
    @chenguoyu 那两个选项已经这样设置了,还是不起作用
    nicevar
        3
    nicevar  
       Dec 11, 2017
    再次点击部署的时候没有弹出四个选项的对话框?
    yzq007
        4
    yzq007  
       Dec 11, 2017
    debug 栏 deployment 最下面那个选中没?
    ithrows
        5
    ithrows  
    OP
       Dec 11, 2017
    @nicevar 没有出现对话框
    ithrows
        6
    ithrows  
    OP
       Dec 11, 2017
    @yzq007 你是说哪个位置的 debug 栏呢? 之前使用时不需要 debug 启动也可以看到更新的内容的。
    yzq007
        7
    yzq007  
       Dec 11, 2017
    alt+5 的 deployment 这个要设置,还有服务器 edit configurations 也要设置
    letitbesqzr
        8
    letitbesqzr  
       Dec 11, 2017
    自带的热部署? ... 用 jrebel 试试呢
    palmers
        9
    palmers  
       Dec 11, 2017
    可以从以下方面粗略排除下
    1. 检查部署的是 xx:war 还是 xx:war exploded
    2. 项目是否分模块了, 被修改文件在依赖模块中
    3. 是否存在静态资源文件缓存
    ithrows
        10
    ithrows  
    OP
       Dec 11, 2017
    @yzq007 没找到 deployment 的设置
    ithrows
        11
    ithrows  
    OP
       Dec 11, 2017
    @letitbesqzr 是自带的热部署,之前用的好好的,不知道怎么搞得就不好使了。jrebel 也不管用。
    ithrows
        12
    ithrows  
    OP
       Dec 11, 2017
    @palmers 1.是 exploded 方式,2.没有分模块,3.没有缓存。推测原因是每次部署的是 war 包,修改的文件没有打进 war 就不起作用。但是又由于是 exploded 方式的,所以很费解。
    nicevar
        13
    nicevar  
       Dec 11, 2017
    检查一下运行配置里面的 Deployment,如果没问题项目是 maven 组织的话 mvn clean 看还是否出现
    chenguoyu
        14
    chenguoyu  
       Dec 12, 2017
    最后就是去输出文件夹里面看看,文件是否已经更新。
    ithrows
        15
    ithrows  
    OP
       Dec 12, 2017
    @chenguoyu 输出文件夹里面的文件没有更新,这是什么原因?
    chenguoyu
        16
    chenguoyu  
       Dec 12, 2017
    @ithrows 在设置服务器的页面中,下面有个 before launch,在部署前应该有 build,有没有不小心删掉了
    ithrows
        17
    ithrows  
    OP
       Dec 12, 2017
    @chenguoyu 有的,没被删掉
    chenguoyu
        18
    chenguoyu  
       Dec 12, 2017
    没碰到过这种情况,要不 file->invalidate caches/restart 试下吧
    YzSama
        19
    YzSama  
       Dec 25, 2017
    试试 ctrl+F9,使用 jrebel 可以实现热加载。多模块稍微有点复杂
    TimerKai
        20
    TimerKai  
       Jul 31, 2019
    遇到相同的情况,maven 项目,原因是页面被人在 pom.xml 里用 warSourceExcludes 标签排除了.......虽然是坟贴,但是我百度到这里了,希望给后来的遇到类似情况的人一些参考吧....吃我一记洛阳铲!(`·ω·)
    About     Help     Advertise     Blog     API     FAQ     Solana     3261 Online   Highest 6679       Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 83ms UTC 14:16 PVG 22:16 LAX 07:16 JFK 10:16
    Do have faith in what you're doing.
    ubao msn snddm index pchome yahoo rakuten mypaper meadowduck bidyahoo youbao zxmzxm asda bnvcg cvbfg dfscv mmhjk xxddc yybgb zznbn ccubao uaitu acv GXCV ET GDG YH FG BCVB FJFH CBRE CBC GDG ET54 WRWR RWER WREW WRWER RWER SDG EW SF DSFSF fbbs ubao fhd dfg ewr dg df ewwr ewwr et ruyut utut dfg fgd gdfgt etg dfgt dfgd ert4 gd fgg wr 235 wer3 we vsdf sdf gdf ert xcv sdf rwer hfd dfg cvb rwf afb dfh jgh bmn lgh rty gfds cxv xcv xcs vdas fdf fgd cv sdf tert sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf shasha9178 shasha9178 shasha9178 shasha9178 shasha9178 liflif2 liflif2 liflif2 liflif2 liflif2 liblib3 liblib3 liblib3 liblib3 liblib3 zhazha444 zhazha444 zhazha444 zhazha444 zhazha444 dende5 dende denden denden2 denden21 fenfen9 fenf619 fen619 fenfe9 fe619 sdf sdf sdf sdf sdf zhazh90 zhazh0 zhaa50 zha90 zh590 zho zhoz zhozh zhozho zhozho2 lislis lls95 lili95 lils5 liss9 sdf0ty987 sdft876 sdft9876 sdf09876 sd0t9876 sdf0ty98 sdf0976 sdf0ty986 sdf0ty96 sdf0t76 sdf0876 df0ty98 sf0t876 sd0ty76 sdy76 sdf76 sdf0t76 sdf0ty9 sdf0ty98 sdf0ty987 sdf0ty98 sdf6676 sdf876 sd876 sd876 sdf6 sdf6 sdf9876 sdf0t sdf06 sdf0ty9776 sdf0ty9776 sdf0ty76 sdf8876 sdf0t sd6 sdf06 s688876 sd688 sdf86