準備工作:1、下載Jrebel的離線包安裝包,我選擇的版本是6.4.3版本。
2、下載Jrebel的破解補丁包,同樣也是針對6.4.3版本的
Jrebel官網下載地址:https://plugins.jetbrains.com/idea/plugin/4441-jrebel-for-intellij
下載後是 jr-ide-intellij-6.4.3_13-16.zip 的一個文件
補丁包地址:http://pan.baidu.com/s/1i4D9ZTz 獲取密碼 vecj
下載後是 jrebel6.4.3-cracked.zip 的壓縮包,並解壓
然後離線安裝 Jrebel插件 ,如下圖
安裝完插件關閉 idea
下面開始破解
打開解壓補丁,替換兩個jar包與一個licence文件
1、將本機 C:\Users\你的用戶名\.jrebel\jrebel.lic替換爲下載的補丁包裏的 jrebel.lic;
2、C:\Users\你的用戶名.IntelliJIdea2016.1\config\plugins\jr-ide-idea\lib\jrebel6\jrebel.jar
3、C:\Users\你的用戶名.IntelliJIdea2016.1\config\plugins\jr-ide-idea\lib\jrebel\jrebel.jar
將補丁解壓包裏的文件分別覆蓋一下文件,注意文件夾的名字哦。覆蓋完
然後啓動idea 查看是否已激活
激活後,設置jrebel,選擇settings -> jrebel -> advanced 選擇Jrebel 6 Agent,然後重啓idea。
Jrebel的配置按默認就好,最後通過Jrebel去啓動tomcat
當一個項目使用maven多模塊開發時通過上面的配置, 只能自動加載webapp所在的模塊, 若想改動其他模塊的代碼也要自動加載, 需在項目的根(父)pom.xml中加入下面的配置:
<plugin>
<groupId>org.zeroturnaround</groupId>
<artifactId>jrebel-maven-plugin</artifactId>
<version>1.1.5</version>
<configuration>
<addResourcesDirToRebelXml>true</addResourcesDirToRebelXml>
<alwaysGenerate>true</alwaysGenerate>
<showGenerated>true</showGenerated>
</configuration>
<executions>
<execution>
<id>generate-rebel-xml</id>
<phase>process-resources</phase>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
</plugin>
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
運行mvn jrebel:generate, 生成rebel.xml文件.