我想根据调用的方法不同地授权对我的 rest api 的调用。但RequestHandler
看起来像这样:
public interface RequestHandler {
Response handleRequest(Message m,
ClassResourceInfo resourceClass);
}
我不知道如何Method
从 that 中调用 that resourceClass
。这可能吗?
ResponseHandler
似乎有一个可以执行此操作的参数,名为OperationResourceInfo
:
public interface ResponseHandler {
Response handleResponse(Message m,
OperationResourceInfo ori,
Response response);
}
但是到那时,我已经删除了我无权删除的东西(例如)。
如何确定在请求过滤器中将调用什么方法?FWIW,我想要的原因Method
是因为我想搜索我将放在每个方法上的自定义构建注释。如果有更好的方法来解决这个问题,我对这个想法持开放态度。
为了完整起见,这里是有关该主题的文档: http: //cxf.apache.org/docs/jax-rs-filters.html