- 欢迎注明本文链接进行转载,本文链接:https://www.jianshu.com/p/4f3b6df7460d
1.在Eclipse中下载安装jrebel插件
-
打开Help->Eclipse Marketplace...
image.png -
搜索JRebel,然后点击installed,等待安装完成后,在弹出的是否重启Eclipse对话框点击确定,等待自动重启Eclipse,插件安装完成
image.png - 插件激活
插件激活请参考:https://blog.csdn.net/lawsonjin/article/details/76422807
2.配置Tomcat插件和JRebel插件
<!-- Tomcat插件 -->
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.2</version>
<configuration>
<port>80</port>
<path>/</path>
</configuration>
</plugin>
<!-- jrebel热部署插件 -->
<plugin>
<groupId>org.zeroturnaround</groupId>
<artifactId>jrebel-maven-plugin</artifactId>
<version>1.1.8</version>
<executions>
<execution>
<id>generate-rebel-xml</id>
<phase>process-resources</phase>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
</plugin>
3.选中项目,点击右键-->JRebel-->Enable JRebel会在项目的src/main/resources目录下自动生成rebel.xml配置文件:
image.pngimage.png
4.选中项目,点击右键Run As -> Run configuration...
image.png5.在Main中配置好运行项目所需配置,并且在JRebel选项中勾选Enable JRebel agent
image.png image.png6.运行结果:如下图说明JRebel插件启动成功,随后tomcat也开始启动:
image.pngimage.png
网友评论