jrebel启动项目无法加载最新的class

  • 问题描述
    今天出了个奇怪的问题,修改了java文件也重新打包编译了使用idea启动项目,class显示是被更新了,但是使用jrebel启动项目就无法读取到新的文件。
  • 问题原因
    各种查找,最后在rebel.xml文件中发现了问题。
<?xml version="1.0" encoding="UTF-8"?>

<!--
  This is the JRebel configuration file. It maps the running application to your IDE workspace, enabling JRebel reloading for this project.
  Refer to https://manuals.zeroturnaround.com/jrebel/standalone/config.html for more information.
-->
<application generated-by="intellij" 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="/Users/***/workspace_reg_idea_dev/my***_service/***-impl/target/classes">
        </dir>
    </classpath>

</application>

上面使用的dir路径写错了,因为开发使用git管理,本地有多个版本,来回切换给弄错了,上面的dir就是jrebel需要加载的class路径

©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容