Is it correct that Jersey does not support declarative hyperlinking in nested resources?

非 Y 不嫁゛ 提交于 2019-12-10 17:35:45

问题


public class Widget {
    @Ref(resource=WidgetResource.class)
    URI url;

    ...

    public URI getUrl() {
        return url;
    }

    public Wonkle getWonkle() {
        return wonkle;
    }

}

public class Wonkle {
    @Ref(resource=WonkleResource.class)
    URI url;

    public URI getUrl() {
        return url;
    }

   ...
}

The JSON representation of the the Wonkle type has a url attribute with an appropriate value. However, when the Wonkle is used as a nested attribute in the Widget type, its url attribute has a null value.

Am I doing something incorrectly, or is this this just the way the LinkFilter works?

Thanks!

来源:https://stackoverflow.com/questions/14885383/is-it-correct-that-jersey-does-not-support-declarative-hyperlinking-in-nested-re

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!