MyEclipse10使用JRebel

在MyEclipse+JRebel+Tomcat,解决开发传统Web项目的时候,修改方法、增加参数,需要重启tomcat。

修改项 Tomcat JRebel
方法内代码 不重启 不重启
类内的方法 重启 不重启
Spring相关文件 重启 改成用注解的方式后,不重启
Hibernate mapping文件 重启 不重启
修改页面、静态文件 不重启 不重启
SpingMVC新增页面 重启 重启

**

安装插件方式采用下载,解压方式

**
我的MyEclipse版本
MyEclipse10使用JRebel

1. 下载插件包

打开 http://update.zeroturnaround.com/update-site/
MyEclipse10使用JRebel

2. 添加插件到MyEclipse

找到MyEclipse安装路径下\MyEclipse 10\dropins\文件夹新建文件夹JRedel
MyEclipse10使用JRebel
复制压缩包中的三个文件夹到E:\li\MyEclipse\MyEclipse 10\dropins\JRedel
MyEclipse10使用JRebel

3. MyEclipse中设置JRebel

重启MyEclipse,打开后就回弹出JRebel的欢迎页面,证明已经添加成功
首先需要**,自行百度
MyEclipse10使用JRebel
设置JRebelMyEclipse10使用JRebel
Overview页面不需要操作MyEclipse10使用JRebel
Projects页面勾选需要热部署的项目,只勾选第一个框
MyEclipse10使用JRebel
Startup页面无需设置
MyEclipse10使用JRebel
Remote servers页面无需设置
MyEclipse10使用JRebel
Advanced页面无需设置
MyEclipse10使用JRebel
tomcat设置
MyEclipse10使用JRebel
MyEclipse10使用JRebel
勾选自动构建
MyEclipse10使用JRebel

重点:右键tomcat,Debug configurations 修改jvm参数

MyEclipse10使用JRebel
追加参数
-Drebel.spring_plugin=true
-Drebel.aspectj_plugin=true
-Drebel.struts2_plugin=true
-gentpath:E:\li\MyEclipse\Common\plugins\org.zeroturnaround.eclipse.embedder_2019.1.1.RELEASE\jrebel\lib\jrebel64.dll
-noverify

重点是agentpath参数的路径,是Common\plugins下的文件。

4. Debug模式启动项目

控制台输出Jrebel 日志表示设置成功
MyEclipse10使用JRebel
启动后修改类控制台会有日志
MyEclipse10使用JRebel
使用了一段发现了一个小缺点就是,Tomcat和IDE的jdk需要分配更多的内存。