Jrebel + eclipse + tomcat 用于热部署 的实践总结

1、用eclipse 下载 http://update.zeroturnaround.com/update-site


2、接着替换 your eclipse location\plugins\org.zeroturnaround.eclipse.embedder_6.0.0.RELEASE-201410311652\jrebel ,即eclipse所在目录的plugins 替换jrebel里面的jar包。


3、去eclipse 中注册jrebel ,替换文件是jrebel.lic,提示注册成功

[color=darkred]以上部分是注册部分[/color]


1、双击servers 下面的某个tomcat服务,点击overview,需要配置如下参数:

a、 Server Locations选择 User Tomcat installation

b、 Publishing中选择 Never publish automatically

c、 Timeouts中 Start设置成 1000或更大

d、 JRebel Integration中两个复选框都选中

e、选择Open lauch configuration,在(x)=Arguments选项卡中增加 配置VM arguments参数:

-noverify

-Drebel.struts2-plugin=true

-Drebel.spring_plugin=true

-Xms256m -Xmx256m -XX:MaxNewSize=256m -XX:MaxPermSize=256m


2、双击servers中下面某个tomcat服务,点击modules,添加你需要的module。 需要add external web module.注意document base 需要填写的是程序的webapp的位置,而非tomcat下编译的位置。如:


your project location\xxxxxx\WebApps


Path为要访问的程序web名


3、其次程序上右击选择jrebel,advanced properties.当然了,需要enable 一下jrebel。可以重新生成一下rebel文件。


4、至此,程序可以达到热部署了。


[color=red]以上是使用插件模式。(一般没什么用)[/color]

-noverify
-javaagent:D:\xxxx\xxxxx\jrebel.jar
-Drebel.dirs=your project location\xxxx\WebApps\WEB-INF\classes,your project location\xxxx\WebApps\WEB-INF\classes\config,your project location\xxxxx\WebApps
-Drebel.spring_plugin=true
-Drebel.aspectj_plugin=true
-Drebel.struts2_plugin=true
-Drebel.hibernate_plugin=true
-Drebel.hibernate_validator_plugin=true

或者把这些加到tomcat的启动参数里面

最后要注意的是tomcat的modules中的某个module 的auto reload参数要配置成disabled


[color=green]此方法经实践可用
[/color]
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值