为Hybris配置JRebel流程

安装JRebel

  1. 下载地址: https://zeroturnaround.com/software/jrebel/download/
  2. 配置环境变量 %JREBEL_HOME% 为 jrebel.jar 所在的目录

配置JRebel

  1. 配置licence Server:

Add host file entry:

<pre>xxx.xxx.xxx.xxx jrebel.server.com</pre>

  1. 激活

访问Lic server的Access Token之前发过邮件, 可以在插件中进行配置,或者运行JRebel目录下的GUI工具完成。

  1. 修改JRebel配置

同上可以在插件中配置

安装JRebel eclipse plugin ( 可选 )

  1. 从Eclipse市场安装

  2. 右键插件项目生成jrebel.xml文件,或者参照例子文件来生成 '

    <?xml version="1.0" encoding="UTF-8"?>
    	<application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.zeroturnaround.com" xsi:schemaLocation="http://www.zeroturnaround.com http://www.zeroturnaround.com/alderaan/rebel-2_0.xsd">
    
    		<classpath>
    			<dir name="C:/Work/%Project Name%/web/webroot/WEB-INF/classes" />
    			</dir>
    		</classpath>
    
    	</application>
    

'

配置Hybris

  1. 配置Hybris Server

<pre> tomcat.javaoptions=-Xverify:none -javaagent: "%JREBEL_HOME%/jrebel.jar=de.hybris.tomcat.HybrisWebappClassLoader60" </pre>

  1. 在Debug模式下运行JRebel的参数

<pre> tomcat.debugjavaoptions=-Xverify:none -javaagent: "%JREBEL_HOME%/jrebel.jar=de.hybris.tomcat.HybrisWebappClassLoader60" -Xdebug -Xrunjdwp:transport=dt_socket,server=y,address= 8000 ,suspend=n </pre>

  1. 在生成的JRebel.xml文件中加入类路径

     <dir name="C:/Work/%Project Name%/web/webroot/WEB-INF/classes" />
    

=9

  1. Run Ant Deploy in the platform_home

使用

  1. 因为Eclipse的Build路径与实际路径不符, 使用ant build对代码进行编译,ant all之后hybris会自动重启
  2. Spring的配置文件理论上是可以通过JRebel来实行实时加载的,有对应的插件,启动时JRebel也自动进行了加载,但是实际测试并没有成功。

转载于:https://my.oschina.net/kookoo/blog/465727

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值