JRebel不会使用Glassfish 3.1.2.1重新加载更改

时间:2019-07-02 10:34:32

标签: intellij-idea jrebel

我有一个带有jax-rs的Java EE 6项目和一个带有glassfish 3.1.2.1和Windows 10的Java7。我已经安装了jrebel插件,并且在我的项目中启用了Jrebel。这导致创建api / src / main / resources / 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="C:/MyProjects/api/target/classes">
        </dir>
    </classpath>

    <web>
        <link target="/">
            <dir name="C:/MyProjects/api/src/main/webapp">
            </dir>
        </link>
    </web>

</application>

在src / main / java / mypackage / myservice.java中,我有以下代码:

@Path("/myendpoint")
@Stateless
public class MyClass{

    @GET
    @Path("/{id}")
    @Produces(MediaType.APPLICATION_JSON)
    public Response getByID(@PathParam("id")String id){


            JSONObject myObject= new JSONObject();
            myObject.put("name","Daniel Garcia Miguel");
            myObject.put("details","TOYOTA YARIS HYBRID - 2015 - ZXX2239");
            myObject.put("value","16.000,00€");
            myObject.put("status","suspended");
            myObject.put("test","ok");

            return Response.ok(myObject.toString(),MediaType.APPLICATION_JSON).build();


    }
}

我使用JRebel启动调试模式,首先,我可以到达已创建的端点。然后我更改myObject.put(“ test”,“ ok”);到myObject.put(“ test”,“ ok3”);但什么也没发生。

我找到了C:\ Users \ Auser.jrebel \ jrebel.log,可以看到以下内容:

2019-07-01 17:10:48.723 INFO  [45] [IntelliJFSNotify] Not watchable file CREATE C:\MyProjects\api\src\main\mypackage\myservice.java

不确定是否有任何意义。我尝试构建项目Build-> Build Project,在目标中可以看到myservice.class更改。但是我检查了玻璃鱼,并没有发生这种变化。

有什么想法我应该进一步检查吗?

谢谢

1 个答案:

答案 0 :(得分:0)

您发布的日志行用于.java文件,因此不会引起任何问题。 :) 但是,您可以将JRebel日志文件发送到 support@jrebel.com 还是从IntelliJ:帮助-> JRebel->提交支持票证?日志文件位于$ USER_HOME / .jrebel文件夹中。