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 に答える