@@ -0,0 +1,1213 @@
+package com.github.rinfield.app.resource;%0A%0Aimport javax.inject.Inject;%0Aimport javax.inject.Provider;%0Aimport javax.ws.rs.GET;%0Aimport javax.ws.rs.Path;%0Aimport javax.ws.rs.core.Response;%0A%0Aimport org.glassfish.jersey.process.internal.RequestScoped;%0Aimport org.jvnet.hk2.annotations.Service;%0A%0A@Path(%22nested%22)%0Apublic class NestedResource extends AbstractResource %7B%0A%0A    @Inject%0A    private Provider%3CSubResource%3E subResourceProvider;%0A%0A    @GET%0A    public Response get() %7B%0A        return Response.ok(%22top-level%22).build();%0A    %7D%0A%0A    // must not be http method annotated!%0A    @Path(%22sub%22)%0A    public SubResource subresource() %7B%0A        return subResourceProvider.get();%0A    %7D%0A%0A    // with @Path annotation, it will be registered as top-level resource class.%0A    // basically subresource class should have @Service instead of @Path.%0A    @Service%0A    @RequestScoped%0A    public static class SubResource extends AbstractResource %7B%0A        @GET%0A        public Response get() %7B%0A            return Response.ok(uriInfo.getAbsolutePath().toString()).build();%0A        %7D%0A%0A        @GET%0A        @Path(%222%22)%0A        public Response get2() %7B%0A            return Response.ok(uriInfo.getAbsolutePath().toString()).build();%0A        %7D%0A    %7D%0A%7D%0A

implement subresource sample