IDEA配置JRebel實現熱部署的方法
1.下載JRebel and XRebel for Intellij外掛
2. 啟用
請檢視這個文章http://www.cicoding.cn/other/jrebel-activation/
啟用後
開始配置自動編譯
3.勾選Build project automatically
ctrl + shift + alt + /,選擇Registry,勾上 Compiler autoMake allow when app running
4.Edit Configurations
on update action和 on frame deactivation改成 update classes and resources
5.開啟JRebel tool
6.勾選你要熱部署的應用
檢視JRebel日誌
使用JRebel啟動springboot專案
檢視控制檯日誌
常見錯誤
jrebel.jar不相容
JRebel-JVMTI [ERROR] You're using an incompatible 'jrebel.jar' with the JRebel Agent.
JRebel-JVMTI [FATAL] Please make sure that'C:\Users\XXX\AppData\Roaming\JetBrains\IntelliJIdea2020.2\plugins\jr-ide-idea\lib\jrebel6\jrebel.jar' is a copy of lib JRebel ZIP release \Jrebel.jar.
這可能是因為你的IDEA可能不是最新版本,但jrebel的jar包為最新版導致的,
因此請轉到官方網站下載你指定IDEA版本的JRebel壓縮包。然後解壓縮壓縮包以找到jrebel.jar,並將jrebel使用的jar包的路徑更改為解壓縮後的jrebel.jar的檔案路徑。
再次使用JRebel啟動SpringBoot專案併成功啟動。如果修改程式碼,將滑鼠點向IDEA視窗以外的區域會自動build(或者手動按ctrl+shfit+F9)
MrBird nb
到此這篇關於IDEA配置JRebel實現熱部署的方法的文章就介紹到這了,更多相關IDEA配置JRebel實現熱部署內容請搜尋我們以前的文章或繼續瀏覽下面的相關文章希望大家以後多多支援我們!