What is the proper replacement of the Resteasy 3.X PreProcessInterceptor?

后端 未结 3 1498
孤城傲影
孤城傲影 2020-12-15 03:58

I\'m building rest service using an authentication/authorization mechanism as described in this tutorial: http://howtodoinjava.com/2013/06/26/jax-rs-resteasy-basic-authentic

3条回答
  •  北荒
    北荒 (楼主)
    2020-12-15 04:38

    If you need to get access to the underlying java.lang.reflect.Method (like you used to be able to get by implementing AcceptedByMethod), you can do the following:

    ResourceMethodInvoker methodInvoker = (ResourceMethodInvoker) 
                requestContext.getProperty("org.jboss.resteasy.core.ResourceMethodInvoker");
    Method method = methodInvoker.getMethod();
    

提交回复
热议问题