Jax rs 未为拦截器加载jaxrs查询参数

Jax rs 未为拦截器加载jaxrs查询参数,jax-rs,guice,Jax Rs,Guice,我有以下形式的休息服务: @GET @NeedsInterception public void getSomething(@QueryParam("xxx") @MyAnnotation String thing) { //Stuff } 然后我有了一个@NeedsInterception的拦截器 在其中,我对用@MyAnnotation注释的元素执行了一些逻辑 然而,当拦截器被调用时,MethodInvocation对象还没有用QueryParam的值进行解析,相反,它始终是 我有

我有以下形式的休息服务:

@GET
@NeedsInterception
public void getSomething(@QueryParam("xxx") @MyAnnotation String thing) {
    //Stuff
}
然后我有了一个@NeedsInterception的拦截器

在其中,我对用@MyAnnotation注释的元素执行了一些逻辑

然而,当拦截器被调用时,MethodInvocation对象还没有用QueryParam的值进行解析,相反,它始终是


我有没有办法在查询参数解析后进行拦截?

不知道您使用的是哪种类型的拦截程序,但a用于包装对MessageBodyReader.readFrom的调用。由于您不发送带有@GET请求的请求正文,因此不会使用这种拦截器

A应该有助于:

@提供者 公共类SomeFilter实现ContainerRequestFilter{ @凌驾 public void filterContainerRequestContext请求上下文抛出IOException{ 多值Map queryParameters=requestContext.getUriInfo.getQueryParameters; } }
如果将查询参数添加到containerRequestContext,那么这些参数应该通过调用getProperty在拦截器中可用。。。在ReaderInterceptorContext上。