Overriding @Path at Jersey
问题 I've been trying to make a Jersey app that takes the following structure from the path: Example 1 (http:// omitted due to stackoverflow restrictions) example.com/source/{source-id}/ example.com/source/ With code (error handling and unneeded code omitted): With code (sum up): @Path("/source/") public class SourceREST { ... @GET public Response getSource() { return Response.ok("Sources List (no field)").build(); } @GET @Path("/{source-id}") public Response getSource(@PathParam("source-id")