`

IDEA 如何使用JRebel 部署web项目呢?

阅读更多

IDEA 如何使用JRebel 部署web项目呢?

步骤

(1)安装JRebel插件

File|Settings...

 输入JRebel进行搜索,然后安装.

注意:安装完JRebel插件之后需要重启IDEA.

 

(2)配置tomcat

Run|

 依次点开Defaults-Tomcat Server-Local,进入Local Tomcat(Tomcat模板)的设置界面

 

 
点击Configure,设置Tomcat路径,并单击OK保存
 

 

修改"Update" 动作和tomcat端口号

server选项卡,设置On Update action 和 On frame deactivation 两个动作都更新类和资源



 

 

(3)配置输入的classes目录

File|Project structure

 

进入"Project"标签页

 修改"Project compiler output"为D:\software\eclipse\workspace2\<项目名称>\src\main\webapp\WEB-INF\classes

 

设置modules的代码编译输出目录. 点击modules 设置右侧 use module compile output path

都是设置为D:\software\eclipse\workspace2\<项目名称>\src\main\webapp\WEB-INF\classes



 



 

指定Web.xml和WebRoot的路径. 点击web,分别指定

Web Module deployment descriptor  路径为 D:\software\eclipse\workspace2\convention\src\main\webapp\WEB-INF\web.xml

和 Web Resource Directory的路径 为 D:\software\eclipse\workspace2\convention\src\main\webapp


 

点击Apply.

 

进入Artifacts 标签页,修改Output directory:

 

 

(4)添加对应project的应用服务器

 

 去掉"After launch"的勾选

保存之后并点击Deployment选项卡,



 
选择exploded那项


 
 
右边设置访问的uri即应用路径,

 



 

 

 
保存,回到server选项卡,设置On Update action 和 On frame deactivation 两个动作都更新类和资源

 

 

(5)为了防止点击 reimport按钮导致moudels 和 artifact 两个选项卡里面的路径恢复默认的问题



 

(6)配置JRebel



 

(7)以JRebel 方式启动

 或者

 

 

(8)部署好之后,以JRebel 启动,控制台信息:

D:\software\apache-tomcat-7.0.59-windows-x64_idea\apache-tomcat-7.0.59\bin\catalina.bat run

[2015-12-28 11:05:48,261] Artifact convention:war exploded: Server is not connected. Deploy is not available.

Using CATALINA_BASE:   "C:\Users\Administrator\.IntelliJIdea15\system\tomcat\Unnamed_convention"

Using CATALINA_HOME:   "D:\software\apache-tomcat-7.0.59-windows-x64_idea\apache-tomcat-7.0.59"

Using CATALINA_TMPDIR: "D:\software\apache-tomcat-7.0.59-windows-x64_idea\apache-tomcat-7.0.59\temp"

Using JRE_HOME:        "C:\Program Files\Java\jdk1.7.0_55"

Using CLASSPATH:       "D:\software\apache-tomcat-7.0.59-windows-x64_idea\apache-tomcat-7.0.59\bin\bootstrap.jar;D:\software\apache-tomcat-7.0.59-windows-x64_idea\apache-tomcat-7.0.59\bin\tomcat-juli.jar"

2015-12-28 23:05:49 JRebel:  

2015-12-28 23:05:49 JRebel:  #############################################################

2015-12-28 23:05:49 JRebel:  

2015-12-28 23:05:49 JRebel:  JRebel Legacy Agent 6.3.1 (201512181654)

2015-12-28 23:05:49 JRebel:  (c) Copyright ZeroTurnaround AS, Estonia, Tartu.

2015-12-28 23:05:49 JRebel:  

2015-12-28 23:05:49 JRebel:  Over the last 30 days JRebel prevented

2015-12-28 23:05:49 JRebel:  at least 130 redeploys/restarts saving you about 0.2 hours.

2015-12-28 23:05:49 JRebel:  

2015-12-28 23:05:49 JRebel:  Over the last 237 days JRebel prevented

2015-12-28 23:05:49 JRebel:  at least 1375 redeploys/restarts saving you about 2.3 hours.

2015-12-28 23:05:49 JRebel:  

2015-12-28 23:05:49 JRebel:  Licensed to wei huang (yonyou)

2015-12-28 23:05:49 JRebel:  

2015-12-28 23:05:49 JRebel:  License type: evaluation

2015-12-28 23:05:49 JRebel:  Valid from: December 28, 2015

2015-12-28 23:05:49 JRebel:  Valid until: January 11, 2016

2015-12-28 23:05:49 JRebel:  

2015-12-28 23:05:49 JRebel:  You are using an EVALUATION license.

2015-12-28 23:05:49 JRebel:  Days left until license expires: 14

2015-12-28 23:05:49 JRebel:  

2015-12-28 23:05:49 JRebel:  To extend your evaluation or purchase a license,

2015-12-28 23:05:49 JRebel:  contact sales@zeroturnaround.com.

2015-12-28 23:05:49 JRebel:  

2015-12-28 23:05:49 JRebel:  If you think this is an error, contact support@zeroturnaround.com.

2015-12-28 23:05:49 JRebel:  

2015-12-28 23:05:49 JRebel:  

2015-12-28 23:05:49 JRebel:  #############################################################

2015-12-28 23:05:49 JRebel:  

十二月 28, 2015 11:05:52 下午 org.apache.catalina.startup.VersionLoggerListener log

信息: Server version:        Apache Tomcat/7.0.59

十二月 28, 2015 11:05:52 下午 org.apache.catalina.startup.VersionLoggerListener log

信息: Server built:          Jan 28 2015 15:51:10 UTC

十二月 28, 2015 11:05:52 下午 org.apache.catalina.startup.VersionLoggerListener log

信息: Server number:         7.0.59.0

十二月 28, 2015 11:05:52 下午 org.apache.catalina.startup.VersionLoggerListener log

信息: OS Name:               Windows 7

十二月 28, 2015 11:05:52 下午 org.apache.catalina.startup.VersionLoggerListener log

信息: OS Version:            6.1

十二月 28, 2015 11:05:52 下午 org.apache.catalina.startup.VersionLoggerListener log

信息: Architecture:          amd64

十二月 28, 2015 11:05:52 下午 org.apache.catalina.startup.VersionLoggerListener log

信息: Java Home:             C:\Program Files\Java\jdk1.7.0_55\jre

十二月 28, 2015 11:05:52 下午 org.apache.catalina.startup.VersionLoggerListener log

信息: JVM Version:           1.7.0_55-b13

十二月 28, 2015 11:05:52 下午 org.apache.catalina.startup.VersionLoggerListener log

信息: JVM Vendor:            Oracle Corporation

十二月 28, 2015 11:05:52 下午 org.apache.catalina.startup.VersionLoggerListener log

信息: CATALINA_BASE:         C:\Users\Administrator\.IntelliJIdea15\system\tomcat\Unnamed_convention

十二月 28, 2015 11:05:52 下午 org.apache.catalina.startup.VersionLoggerListener log

信息: CATALINA_HOME:         D:\software\apache-tomcat-7.0.59-windows-x64_idea\apache-tomcat-7.0.59

十二月 28, 2015 11:05:52 下午 org.apache.catalina.startup.VersionLoggerListener log

信息: Command line argument: -Drebel.base=C:\Users\Administrator\.jrebel

十二月 28, 2015 11:05:52 下午 org.apache.catalina.startup.VersionLoggerListener log

信息: Command line argument: -Drebel.env.ide.plugin.version=6.3.1-idea-13-15

十二月 28, 2015 11:05:52 下午 org.apache.catalina.startup.VersionLoggerListener log

信息: Command line argument: -Drebel.env.ide.version=15.0.2

十二月 28, 2015 11:05:52 下午 org.apache.catalina.startup.VersionLoggerListener log

信息: Command line argument: -Drebel.env.ide.product=IU

十二月 28, 2015 11:05:52 下午 org.apache.catalina.startup.VersionLoggerListener log

信息: Command line argument: -Drebel.env.ide=intellij

十二月 28, 2015 11:05:52 下午 org.apache.catalina.startup.VersionLoggerListener log

信息: Command line argument: -Drebel.notification.url=http://localhost:55537

十二月 28, 2015 11:05:52 下午 org.apache.catalina.startup.VersionLoggerListener log

信息: Command line argument: -javaagent:C:\Users\Administrator\.IntelliJIdea15\config\plugins\jr-ide-idea\lib\jrebel\jrebel.jar

十二月 28, 2015 11:05:52 下午 org.apache.catalina.startup.VersionLoggerListener log

信息: Command line argument: -Dcom.sun.management.jmxremote=

十二月 28, 2015 11:05:52 下午 org.apache.catalina.startup.VersionLoggerListener log

信息: Command line argument: -Dcom.sun.management.jmxremote.port=1099

十二月 28, 2015 11:05:52 下午 org.apache.catalina.startup.VersionLoggerListener log

信息: Command line argument: -Dcom.sun.management.jmxremote.ssl=false

十二月 28, 2015 11:05:52 下午 org.apache.catalina.startup.VersionLoggerListener log

信息: Command line argument: -Dcom.sun.management.jmxremote.authenticate=false

十二月 28, 2015 11:05:52 下午 org.apache.catalina.startup.VersionLoggerListener log

信息: Command line argument: -Djava.rmi.server.hostname=127.0.0.1

十二月 28, 2015 11:05:52 下午 org.apache.catalina.startup.VersionLoggerListener log

信息: Command line argument: -Djava.util.logging.config.file=C:\Users\Administrator\.IntelliJIdea15\system\tomcat\Unnamed_convention\conf\logging.properties

十二月 28, 2015 11:05:52 下午 org.apache.catalina.startup.VersionLoggerListener log

信息: Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager

十二月 28, 2015 11:05:52 下午 org.apache.catalina.startup.VersionLoggerListener log

信息: Command line argument: -Djava.endorsed.dirs=D:\software\apache-tomcat-7.0.59-windows-x64_idea\apache-tomcat-7.0.59\endorsed

十二月 28, 2015 11:05:52 下午 org.apache.catalina.startup.VersionLoggerListener log

信息: Command line argument: -Dcatalina.base=C:\Users\Administrator\.IntelliJIdea15\system\tomcat\Unnamed_convention

十二月 28, 2015 11:05:52 下午 org.apache.catalina.startup.VersionLoggerListener log

信息: Command line argument: -Dcatalina.home=D:\software\apache-tomcat-7.0.59-windows-x64_idea\apache-tomcat-7.0.59

十二月 28, 2015 11:05:52 下午 org.apache.catalina.startup.VersionLoggerListener log

信息: Command line argument: -Djava.io.tmpdir=D:\software\apache-tomcat-7.0.59-windows-x64_idea\apache-tomcat-7.0.59\temp

十二月 28, 2015 11:05:52 下午 org.apache.catalina.core.AprLifecycleListener lifecycleEvent

信息: Loaded APR based Apache Tomcat Native library 1.1.32 using APR version 1.5.1.

十二月 28, 2015 11:05:52 下午 org.apache.catalina.core.AprLifecycleListener lifecycleEvent

信息: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].

十二月 28, 2015 11:05:54 下午 org.apache.catalina.core.AprLifecycleListener initializeSSL

信息: OpenSSL successfully initialized (OpenSSL 1.0.1j 15 Oct 2014)

十二月 28, 2015 11:05:54 下午 org.apache.coyote.AbstractProtocol init

信息: Initializing ProtocolHandler ["http-apr-80"]

十二月 28, 2015 11:05:54 下午 org.apache.coyote.AbstractProtocol init

信息: Initializing ProtocolHandler ["ajp-apr-8009"]

十二月 28, 2015 11:05:54 下午 org.apache.catalina.startup.Catalina load

信息: Initialization processed in 2609 ms

十二月 28, 2015 11:05:54 下午 org.apache.catalina.core.StandardService startInternal

信息: Starting service Catalina

十二月 28, 2015 11:05:54 下午 org.apache.catalina.core.StandardEngine startInternal

信息: Starting Servlet Engine: Apache Tomcat/7.0.59

十二月 28, 2015 11:05:54 下午 org.apache.coyote.AbstractProtocol start

信息: Starting ProtocolHandler ["http-apr-80"]

十二月 28, 2015 11:05:54 下午 org.apache.coyote.AbstractProtocol start

信息: Starting ProtocolHandler ["ajp-apr-8009"]

十二月 28, 2015 11:05:54 下午 org.apache.catalina.startup.Catalina start

信息: Server startup in 82 ms

Connected to server

[2015-12-28 11:05:54,535] Artifact convention:war exploded: Artifact is being deployed, please wait...

2015-12-28 23:05:55 JRebel: Directory 'D:\software\eclipse\workspace2\common_ssh\target\classes' will be monitored for changes.

2015-12-28 23:05:55 JRebel: Directory 'D:\software\eclipse\workspace2\io0007-find_progess\target\classes' will be monitored for changes.

2015-12-28 23:05:55 JRebel: Directory 'D:\software\eclipse\workspace2\oa_framework\target\classes' will be monitored for changes.

2015-12-28 23:06:01 JRebel: Monitoring Log4j configuration in 'file:/D:/software/eclipse/workspace2/convention/src/main/webapp/WEB-INF/classes/log4j.properties'.

28 十二月 2015 23:06:02,138  INFO org.springframework.web.context.support.XmlWebApplicationContext:510 - Refreshing Root WebApplicationContext: startup date [Mon Dec 28 23:06:02 CST 2015]; root of context hierarchy

28 十二月 2015 23:06:02,502  INFO org.springframework.beans.factory.xml.XmlBeanDefinitionReader:315 - Loading XML bean definitions from class path resource [beans.xml]

28 十二月 2015 23:06:02,930  INFO org.springframework.beans.factory.xml.XmlBeanDefinitionReader:315 - Loading XML bean definitions from class path resource [tv_beans.xml]

28 十二月 2015 23:06:03,057  INFO org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider:231 - JSR-250 'javax.annotation.ManagedBean' found and supported for component scanning

28 十二月 2015 23:06:04,303  INFO org.springframework.context.support.PropertySourcesPlaceholderConfigurer:172 - Loading properties file from class path resource [jdbc.properties]

2015-12-28 23:06:04 JRebel: Monitoring properties in 'D:\software\eclipse\workspace2\convention\src\main\webapp\WEB-INF\classes\jdbc.properties'.

28 十二月 2015 23:06:05,514  INFO org.hibernate.annotations.common.Version:37 - HCANN000001: Hibernate Commons Annotations {4.0.2.Final}

28 十二月 2015 23:06:05,527  INFO org.hibernate.Version:41 - HHH000412: Hibernate Core {4.2.2.Final}

28 十二月 2015 23:06:06,701  INFO org.hibernate.hql.internal.ast.ASTQueryTranslatorFactory:48 - HHH000397: Using ASTQueryTranslatorFactory

初始化字典

Hibernate: 

    /* criteria query */ select

        this_.id as id1_3_0_,

        this_.description as descript2_3_0_,

        this_.groupId as groupId3_3_0_,

        this_.key2 as key4_3_0_,

        this_.value as value5_3_0_ 

    from

        t_dictionary this_ 

    order by

        this_.groupId asc,

        this_.key2 asc

28 十二月 2015 23:06:12,566  INFO org.springframework.web.servlet.DispatcherServlet:454 - FrameworkServlet 'spring2': initialization started

28 十二月 2015 23:06:12,574  INFO org.springframework.web.context.support.XmlWebApplicationContext:510 - Refreshing WebApplicationContext for namespace 'spring2-servlet': startup date [Mon Dec 28 23:06:12 CST 2015]; parent: Root WebApplicationContext

28 十二月 2015 23:06:12,583  INFO org.springframework.beans.factory.xml.XmlBeanDefinitionReader:315 - Loading XML bean definitions from ServletContext resource [/WEB-INF/spring2-servlet.xml]

28 十二月 2015 23:06:12,842  INFO org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider:231 - JSR-250 'javax.annotation.ManagedBean' found and supported for component scanning

28 十二月 2015 23:06:13,361  INFO org.hibernate.validator.internal.util.Version:27 - HV000001: Hibernate Validator 5.1.2.Final

28 十二月 2015 23:06:14,762  INFO org.springframework.web.servlet.DispatcherServlet:473 - FrameworkServlet 'spring2': initialization completed in 2195 ms

[2015-12-28 11:06:14,874] Artifact convention:war exploded: Artifact is deployed successfully

[2015-12-28 11:06:14,875] Artifact convention:war exploded: Deploy took 20,340 milliseconds

 

 (9)修改了java文件,不用重启tomcat,自动加载



 

参考:http://blog.csdn.net/sunny243788557/article/details/33688795

 

 

  • 大小: 143.5 KB
  • 大小: 10.1 KB
  • 大小: 143.5 KB
  • 大小: 178.3 KB
  • 大小: 30.1 KB
  • 大小: 79.8 KB
  • 大小: 24.4 KB
  • 大小: 133 KB
  • 大小: 94 KB
  • 大小: 46.3 KB
  • 大小: 78.1 KB
  • 大小: 9.1 KB
  • 大小: 127.1 KB
  • 大小: 46.5 KB
  • 大小: 8.5 KB
  • 大小: 27.1 KB
  • 大小: 30.1 KB
  • 大小: 17.6 KB
  • 大小: 76 KB
  • 大小: 87.6 KB
  • 大小: 17.9 KB
  • 大小: 9.3 KB
  • 大小: 45.7 KB
  • 大小: 82 KB
  • 大小: 96.4 KB
1
1
分享到:
评论

相关推荐

    IntelliJ+Maven+Jetty+Jrebel实现web项目java代码更改后热部署

    "IntelliJ+Maven+Jetty+Jrebel"的组合正是为了解决这一问题,实现Web项目的Java代码更改后能够自动热部署。这个解决方案集成了几个关键工具,包括: 1. **IntelliJ IDEA**: 这是一款强大的Java集成开发环境(IDE)...

    jrebel使用,web工程可以热部署

    《JRebel 使用详解:实现Web工程的热部署》 在软件开发过程中,尤其是在Java领域,经常需要频繁地测试和调试代码,而每次修改代码后都需要重新编译、打包、部署,这一过程既耗时又降低了开发效率。为了解决这个问题...

    IDEA与Eclipse的JRebel插件

    JRebel是一款强大的热部署工具,尤其在Java Web开发中,它能够显著减少因代码修改而频繁重启应用服务器所浪费的时间。 ### IDEA与Eclipse中的JRebel插件 **JRebel简介** JRebel由Zeroturnaround公司开发,它的核心...

    IntelliJ IDEA 12.0 Web开发及热部署

    "IntelliJ IDEA 12.0 Web开发及热部署" 在这篇文章中,我们将学习如何使用 IntelliJ IDEA 12.0 进行 ...我们学习了如何安装和配置相关软件,然后创建 Web 项目,配置 Tomcat 服务器,最后使用 JRebel 5 实现热部署。

    JRebel MAC IDEA热加载

    如果你需要在IDEA中使用JRebel热加载这个Web项目,你需要按照上述步骤进行配置,并确保JRebel能正确识别项目结构和Web相关的配置文件。 总之,JRebel在MAC IDEA中的热加载功能是提高Java开发效率的强大工具,通过...

    jrebel热部署工具-eclipse

    在实际开发中,JRebel的使用不仅限于Eclipse,它还支持其他IDE,如IntelliJ IDEA。JRebel 7可能已经有些过时,现在的最新版本提供了更多优化和兼容性改进,但理解基础原理和操作流程对于新旧版本都至关重要。 为了...

    idea热部署方法.zip

    【标题】"idea热部署方法.zip"所涉及的知识点主要集中在使用IntelliJ IDEA这款流行的Java集成开发环境(IDE)进行热部署配置,以便在开发Spring Boot和Spring MVC项目时,能够快速地测试代码更改而无需每次都手动...

    Jrebel 基于TOMCAT实现项目修改热部署

    下面将详细介绍 JRebel 如何与 Tomcat 集成,实现项目修改后的热部署。 **1. JRebel 的工作原理** JRebel 是通过动态类加载技术,实现在运行时替换已经加载的类,以达到热部署的效果。它拦截了 JVM 的类加载过程,...

    eclipse修改代码后热部署(不需要重启服务

    下面是使用JRebel进行热部署的步骤: 1. **安装JRebel插件**:访问JRebel官网下载并安装适合Eclipse版本的JRebel插件。通常,你可以通过Eclipse的“帮助”&gt;“安装新软件”菜单,然后输入JRebel的更新站点地址进行...

    JRebel-IntellJ-idea-2020.2.4.1.zip

    IDEA上原生是不支持热部署的,一般更新了 Java 文件后要手动重启整个项目,才能生效,使用JRebel后,可以不用重启便可将修改加载进web页面,非常的高效。 目前对于idea热部署最好的解决方案就是安装JRebel插件。

    IntelliJ+Maven+Jetty+Jrebel

    在提供的文档“IntelliJ+Maven+Jetty+Jrebel实现web项目java代码更改后热部署.docx”中,可能会详细介绍每个步骤的详细操作和可能遇到的问题。而“JRebel for IntelliJ IDEA”相关的网页文件可能是官方文档或教程,...

    JRebel 破解文件

    Intellij IDEA的JRebel插件的破解文件,可以实现web项目的热部署

    Tomcat热加载Jrebel

    在Java Web开发中,Tomcat是一个广泛使用的应用服务器,用于部署和运行Servlet和JSP应用程序。然而,每次修改代码后,都需要重新启动Tomcat来使更改生效,这无疑降低了开发效率。为了解决这个问题,引入了热加载技术...

    IntelliJ IDEA 12创建Java Web项目并用Tomcat发布.docx

    在本文中,我们将深入探讨如何使用IntelliJ IDEA 12创建一个Java Web项目,并配置Tomcat服务器进行发布。IntelliJ IDEA是一款强大的集成开发环境(IDE),特别适合Java开发者,它提供了丰富的功能来简化Web应用程序...

    IntelliJ IDEA 热部署插件JRebel 安装使用图文教程

    JRebel是一款专门针对Java Web项目的热部署插件,解决了开发者在Tomcat等应用服务器上运行项目时遇到的问题。通常,当我们在开发过程中修改Java源代码后,需要重新编译和重启应用才能看到变更的效果。而JRebel则允许...

    IntelliJ IDEA 使用教程

    - **Eclipse Java Web项目迁移**:指导如何将原有的Eclipse项目迁移到IntelliJ IDEA环境中。 - **Maven项目管理**:深入讲解如何使用Maven进行项目依赖管理和构建过程自动化。 - **Spring框架集成**:通过具体示例...

    Maven项目中的热部署

    常见的有JRebel、Eclipse的WTP(Web Tools Platform)以及IntelliJ IDEA等IDE的内置功能。这些工具可以监测源代码的变化,并自动将更改部署到运行中的应用服务器。 1. JRebel: 这是一款商业的热部署工具,它可以...

    jrebel插件

    2. **Web项目支持**:对于Web开发者来说,JRebel特别有用,因为它能支持包括Spring、Struts、JSF在内的多种Web框架。即使是对Web-INF下的类、静态文件或JSP页面的修改,都能实时反映在浏览器中,无需重启Tomcat或...

    IntelliJ IDEA 简体中文专题教程

    目录(Contents) 1.IntelliJ IDEA 介绍 2.本教程介绍 3.Windows 下安装 4.Ubuntu 下安装 5.Mac 下安装 6.安装总结 7.首次运行 ...29.IntelliJ IDEA 的 Java 热部署插件 JRebel 安装及使用 30.本教程总结

Global site tag (gtag.js) - Google Analytics