`
ekisstherain
  • 浏览: 172869 次
  • 性别: Icon_minigender_1
社区版块
存档分类
最新评论

jrebel热部署配置(原创)

阅读更多

1. 配置tomcat服务器:修改tomcat的部署配置为:从不自动发布,禁用Web模块的自动从新装入为:禁用
2. 在tomcat运行配置上添加vm参数:-noverify -javaagent:D:\RUNTIME\jrebel\jrebel.jar -Dmyproject.root=D:/project/operamasks/workspaces/xxxx -Drebel.disable_update=true
   其中:-javaagent的值表示jrebel的jar包路径
   -Dmyproject.root的值表示当前的需要热部署的工程路径
3. 在工程的src源文件夹下添加名称为:rebel.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="${myproject.root}/bin">
		</dir>
		<dir name="${myproject.root}/web/WebContent/WEB-INF/classes">
		</dir>
	</classpath>
	<web>
		<link target="/">
			<dir name="${myproject.root}/web/WebContent">
			</dir>
		</link>
	</web>
</application>

 

 

其中:myproject.root就是tomcat vm参数中指定的工程路径,你也可以使用绝对路径
这个文件定义的就是jrebel要监控的具体文件夹,即class文件和资源文件(比如:jsp等)


4.最后,启动tomcat服务器的成功提示:

 

Fri Oct 19 10:34:29 CST 2012 com.zeroturnaround.javarebel.hD#new V( false )
Fri Oct 19 10:34:29 CST 2012 com.zeroturnaround.javarebel.bH#public boolean a(byte abyte0[])

#############################################################

 JRebel 3.0-M1 (200910151623)
 (c) Copyright ZeroTurnaround, Ltd, 2007-2009. All rights reserved.

 A rough estimate: Over the last 5 days JRebel
 prevented the need for at least 36 redeploys/restarts.
 Using industry standard build and redeploy times,
 JRebel saved you between 1 and 2 hours.

 This product is licensed to  Java Hack Organization
 for unlimited number of developer seats on site.

#############################################################


JRebel: A newer version '5.0.1' is available for download
JRebel: from http://www.zeroturnaround.com/download.

2012-10-19 10:34:29 org.apache.catalina.core.AprLifecycleListener init
信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: D:\RUNTIME\java\jdk1.6.0_11\bin;.;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;D:/RUNTIME/java/jdk1.6.0_11/bin/../jre/bin/client;D:/RUNTIME/java/jdk1.6.0_11/bin/../jre/bin;C:\Program Files (x86)\AMD APP\bin\x86_64;C:\Program Files (x86)\AMD APP\bin\x86;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;D:\RUNTIME\java\jdk1.6.0_11\bin;D:\RUNTIME\java\jdk1.6.0_11\jre\bin;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;D:\RUNTIME\MySQL\MySQL Server 7.0\bin;C:\Program Files\TortoiseSVN\bin;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\MacType;C:\PROGRA~1\DISKEE~1\DISKEE~1\;d:\Program Files (x86)\DBank\ClickUp;C:\Program Files (x86)\DBank\ClickUp
2012-10-19 10:34:29 org.apache.tomcat.util.digester.SetPropertiesRule begin
警告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:XXX' did not find a matching property.
2012-10-19 10:34:29 org.apache.coyote.http11.Http11Protocol init
信息: Initializing Coyote HTTP/1.1 on http-8080
2012-10-19 10:34:29 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 324 ms
2012-10-19 10:34:29 org.apache.catalina.core.StandardService start
信息: Starting service Catalina
2012-10-19 10:34:29 org.apache.catalina.core.StandardEngine start
信息: Starting Servlet Engine: Apache Tomcat/6.0.35
JRebel: Directory 'D:\project\eclipse\workspaces\XXX\bin' will be monitored for changes.
JRebel: Directory 'D:\project\eclipse\workspaces\XXX\web\WebContent\WEB-INF\classes' will be monitored for changes.
JRebel: Directory 'D:\project\eclipse\workspaces\XXX\web\WebContent' will be monitored for changes.

=============================== [JRebel Spring Framework Plugin] ===============================
Plugins are contributed by third party and can cause compatibility problems.
If you have any troubles set -Drebel.spring_plugin=false to disable it.
------------------------------------------------------------------------------------------
Description: Supports adding new beans and adding new bean dependencies using
annotations or XML. Singletons will be reconfigured after the change. It also
supports adding or changing Spring MVC controllers or handlers.
=============================== [/JRebel Spring Framework Plugin] ==============================


=============================== [JRebel AspectJ Plugin DISABLED] ==============================
You can enable AspectJ Plugin by setting -Drebel.aspectj_plugin=true.
------------------------------------------------------------------------------------------
Description: Allows the AspectJ load-time weaving (javaagent launched by aj5 or
-javaagent:aspectjweaver.jar) to be used with JavaRebel. Note that AspectJ
weaver will still show "java.lang.Exception: AspectJ5 does not weave hotswapped
class" in the beginning, but this can be safely ignored.
=============================== [/JRebel AspectJ Plugin DISABLED] =============================

2012-10-19 10:34:30 org.apache.catalina.core.ApplicationContext log
信息: Initializing Spring root WebApplicationContext
JavaRebel-Spring: Monitoring Spring bean definitions in 'D:\project\eclipse\workspaces\XXX\web\WebContent\WEB-INF\applicationContext.xml'.
JavaRebel-Spring: Monitoring Spring bean definitions in 'D:\project\eclipse\workspaces\XXX\web\WebContent\WEB-INF\classes\applicationContext.xml'.
JavaRebel-Spring: Monitoring Spring bean definitions in 'D:\project\eclipse\workspaces\XXX\web\WebContent\WEB-INF\classes\applicationContext-dao.xml'.
JavaRebel-Spring: Monitoring Spring bean definitions in 'D:\project\eclipse\workspaces\XXX\web\WebContent\WEB-INF\classes\applicationContext-service.xml'.
JavaRebel-Spring: Monitoring Spring bean definitions in 'D:\project\eclipse\workspaces\XXX\bin\applicationContext-service-log.xml'.
...

 

 

到此为止,你成功配置jrebel了。

值得注意的是:
JRebel: Directory 'D:\project\eclipse\workspaces\XXX\bin' will be monitored for changes.
JRebel: Directory 'D:\project\eclipse\workspaces\XXX\web\WebContent\WEB-INF\classes' will be monitored for changes.
JRebel: Directory 'D:\project\eclipse\workspaces\XXX\web\WebContent' will be monitored for changes.

JavaRebel-Spring: Monitoring Spring bean definitions in 'D:\project\eclipse\workspaces\XXX\web\WebContent\WEB-INF\applicationContext.xml'.
JavaRebel-Spring: Monitoring Spring bean definitions in 'D:\project\eclipse\workspaces\XXX\web\WebContent\WEB-INF\classes\applicationContext.xml'.
JavaRebel-Spring: Monitoring Spring bean definitions in 'D:\project\eclipse\workspaces\XXX\web\WebContent\WEB-INF\classes\applicationContext-dao.xml'.
JavaRebel-Spring: Monitoring Spring bean definitions in 'D:\project\eclipse\workspaces\XXX\web\WebContent\WEB-INF\classes\applicationContext-service.xml'.
JavaRebel-Spring: Monitoring Spring bean definitions in 'D:\project\eclipse\workspaces\XXX\bin\applicationContext-service-log.xml'.

表示在运行期间jrebel会监控这些位置的class文件和资源文件的变化情况!!!!
以后就不需要经常启动tomcat来测试了,这种方便时可想而知的!

 

 

参考

分享到:
评论
1 楼 liude33 2015-05-17  
,配置成功,很实用,不知道我把这个用到生产环境下,会不会影响效率?

相关推荐

    idea中项目jrebel热部署配置步骤

    idea中项目jrebel热部署配置步骤,附有步骤截图,请测有效

    jrebel 热部署工具

    jrebel 热部署工具 破解版

    Myeclipse2015+Jrebel热部署配置

    开发工具相互交流,现在较好的工具推荐用IDEA ,对应eclipse老粉不愿意转工具的可以拿去试试,提高工作效率还是有帮助

    JRebel eclipse 热部署

    JRebel eclipse 热部署

    tomcat远程debug与jrebel热部署文件

    本文将深入探讨如何配置Tomcat的远程调试以及利用JRebel实现热部署,这将极大地提高开发效率。 首先,Tomcat远程调试允许开发者在不重启服务器的情况下定位并修复代码中的问题。这对于大型项目和持续迭代的环境尤其...

    ecilipse+tomcat+jrebel实现热部署

    Eclipse+Tomcat+JRebel 实现热部署 Eclipse、Tomcat 和 JRebel 是三个常用的开发工具,其中 Eclipse 是一个集成开发环境(IDE),Tomcat 是一个 Web 服务器,而 JRebel 是一个热部署工具。热部署是指在不重新编译和...

    jrebel热部署插件

    在提供的文件列表中,可以看到"2014热部署6.5设置.txt",这个文件很可能是关于JRebel 6.5版本的配置指南。打开这个文本文件,按照其中的步骤进行操作,通常包括以下几个关键步骤: 1. 安装JRebel Eclipse插件:如果...

    jrebel热部署工具-eclipse

    为了充分利用JRebel,开发者需要了解如何正确配置项目以使其支持热部署。例如,确保所有项目依赖都被正确地添加到JRebel的配置中,以及设置适当的类路径。同时,对于特定的框架或库,如Spring或Hibernate,可能还...

    idea jrebel 热部署.zip

    IDEA是一款广受欢迎的Java开发集成环境,JRebel则是一款强大的热部署工具,它可以极大地提升开发效率,免去每次修改代码后手动重启应用的过程。本压缩包"idea jrebel 热部署.zip"提供了IDEA中集成JRebel进行热部署的...

    jrebel热部署zip

    **JRebel热部署简介** JRebel 是一个强大的Java开发工具,它允许开发者在不重启应用服务器的情况下实时看到代码更改的效果,极大地提高了开发效率。这个"jrebel热部署zip"文件很可能是JRebel的IDE插件,特别是针对...

    eclipse jrebel热部署插件破解版

    将文件解压到\eclipse\plugins目录下,重启eclipse,若还是提示注册认证,忽略他,其实已经是认证了的,直接运行代码就可以了,记着运行前需要配置JRebel—&gt;勾选Enabel Jrebel agent

    Jrebel热部署本地运行包

    Jrebel热部署本地运行包

    IDEA JRebel热部署插件jar包

    启用JRebel插件后,只需按照以下步骤配置,即可享受热部署带来的便利: 1. 获取JRebel的许可证。JRebel提供试用版和付费版本,需要在官方网站注册获取许可证密钥。 2. 在IDEA的JRebel配置中输入许可证密钥。 3. ...

    Jrebel远程热部署+远程debug1

    **Jrebel 远程热部署与远程 Debug 知识点详解** Jrebel 是一个强大的 Java 开发工具,它提供了应用程序的实时热部署功能,允许开发者在不重启应用的情况下看到代码更改的效果。同时,结合远程 Debug 功能,开发者...

    jrebel for idea2017热部署

    **正文** JRebel是一款强大的Java开发工具,它允许开发者在不重启...总之,"jrebel for idea2017热部署"是提升Java开发效率的重要工具,通过合理使用和配置,可以在保证开发流程流畅的同时,提高开发者的生产效率。

    热部署jrebel

    jrebel热部署,修改前端代码,Java代码,xml配文件,properties文件不用重新部署项目和重启服务器。真的好用,本人已验证使用。 jrebel热部署,修改前端代码,Java代码,xml配文件,properties文件不用重新部署项目...

    JRebel6.4.3热部署

    JAVA热部署安装及配置,实现IDEA无需频繁重启服务。通过自己手动配置,绝对能用!

    jrebel热部署

    jrebel热部署

    jrebel热部署文件破解版

    包括jrebel5.5版本热部署文件及所需配置参数

    springCloud springBoot jrebel 热部署 开发效率

    springCloud springBoot jrebel 热部署 开发效率 jrebel秘钥验证服务,这是一个springboot的服务,自己在本机部署上以后,用本机的服务地址去验证就可以通过了,jrebel破解最简单的方法, 1 启动服务命令 java -jar...

Global site tag (gtag.js) - Google Analytics