【问题标题】:Controlling JRebel package scope控制 JRebel 包范围
【发布时间】:2017-05-12 01:59:07
【问题描述】:

我正在尝试加快使用 JRebel 调试的代码的执行速度。特别是,我注意到框架代码很慢。我想知道我是否可以告诉 JRebel 忽略某些包,就像我们可以设置 JProfiler 忽略某些包和模式一样。

【问题讨论】:

    标签: classloader wildfly jprofiler jrebel


    【解决方案1】:

    你绝对可以。

    • 使用仅用于该目的的系统属性(或添加到 jrebel.properties)。更多信息请访问JRebel agent properties

      -Drebel.exclude_packages=PACKAGE1,PACKAGE2,...
      
    • 使用 Ant 样式的模式在 rebel.xml 中指定排除的包。更多信息请访问rebel.xml configuration

      <?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://update.zeroturnaround.com/jrebel/rebel-2_1.xsd">
        <classpath>
          <dir name="/path/to/module/build/directory/root">
            <exclude name="com/yourapp/package1/internal/**"/>
          </dir>
        </classpath>
      </application>
      

    两种方式的工作方式相似,但由于第二种方式可以单独自定义每个模块,因此通常是首选。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2015-10-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多