0

使用以下代码,serviceIdSegmentis nullwhile serviceIdis not null

class MySubResource {

    @GET
    @Path("{serviceId: .+}")
    public Response readById(@PathParam String serviceId) {
        // serviceId is not null
        // why serviceIdSegment is null?
    }

    @PathParam("serviceId");
    private PathSegment serviceIdSegment;
}

谁能告诉我为什么?

4

1 回答 1

0

当我试图回答时,我注意到这个问题是我的。

readById方法在根资源类匹配后被延迟评估。

于 2016-09-27T05:00:59.617 回答