在 RestEasy 3.0.16.Final 版本中 PreProcessInterceptor 接口已被弃用。那么这个接口的正确替换是什么。在 jboss eap 7 RestEasy 版本 3.0.16.Final 中使用。
旧代码 -
@Provider
@ServerInterceptor
@SecurityPrecedence
public class AbcInterceptor implements PreProcessInterceptor
{
public ServerResponse preProcess(final HttpRequest httpRequest, ResourceMethod resourceMethod) throws Failure,
WebApplicationException {
// auth logic
}
}
新代码 -
@Provider
@ServerInterceptor
@SecurityPrecedence
public class AuthenticationInterceptor
{
public ServerResponse preProcess(HttpRequest httpRequest, ResourceMethodInvoker method)
throws Failure, WebApplicationException {
// auth logic
}
}