Match Filter with specific Method through NameBinding on RESTeasy
I am trying to specify a pre-matching filter that is only associated to some of my API calls, by following what the RESTeasy documentation suggests. Here is what my code looks like: Name binding: @NameBinding public @interface ValidateFoo {} Resource: @Path("/foo/bar") @Produces(MediaType.APPLICATION_JSON) public class FooBar { @GET @ValidateFoo public Object doStuff() { //do stuff } @POST public Object doAnotherStuff() { //do another stuff } } Filter: @ValidateFoo @Provider @PreMatching public class FooValidation implements ContainerRequestFilter { @Override public void filter