Resource classes
A @Pathannotation is required to determine the resource class. Quoting Jersey documentation :
POJO ( Java), @Path, , @Path , @GET, @PUT, @POST, @DELETE.
Justas, @Path("") TestService. :
@Path("")
public class TestService {
@GET
@Path("/v1/test1/list")
public Response getTest1() {
...
}
@GET
@Path("/v1/test2/list")
public Response getTest2() {
...
}
}
, , , , , :
@Path("/v1/test1")
public class TestService1 {
@GET
@Path("/list")
public Response getTest1() {
...
}
}
@Path("/v1/test2")
public class TestService2 {
@GET
@Path("/list")
public Response getTest2() {
...
}
}