jersey-1.0

How to get resource method matched to URI before Jersey invokes it?

烂漫一生 提交于 2019-11-27 01:36:08
问题 I'm trying to implement a ContainerRequestFilter that does custom validation of a request's parameters. I need to look up the resource method that will be matched to the URI so that I can scrape custom annotations from the method's parameters. Based on this answer I should be able to inject ExtendedUriInfo and then use it to match the method: public final class MyRequestFilter implements ContainerRequestFilter { @Context private ExtendedUriInfo uriInfo; @Override public ContainerRequest