I'm creating some resource class with same form so a good idea is use DRY and use inheritance. So I've create a RootResource class and put some methods there. I want to annotate them and then implement them in subclass but it doesn't work! Here is a sample code:
public abstract class RootResource { @GET @Path("/{id: .*}") public abstract String getInfo(String uid); } @Path("/user") public class UserResource extends RootResource{ public String getInfo(@PathParam("id") String uid) { System.out.println("Hello!"); } } I'm using jersey 2.6. Any Idea? Thanks.