Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/356.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 在bean类中绕过拦截器_Java_Stripes_Intercept - Fatal编程技术网

Java 在bean类中绕过拦截器

Java 在bean类中绕过拦截器,java,stripes,intercept,Java,Stripes,Intercept,我已经为我的应用程序创建了一个拦截器。我使用的是stripes框架。 此拦截器拦截来自浏览器的所有reuqest。我想要一个bean类绕过这个拦截器 @Intercepts(LifecycleStage.BindingAndValidation) public class XssInterceptor implements Interceptor 您可以在截取方法中使用以下代码: @Override public Resolution intercept(ExecutionContext co

我已经为我的应用程序创建了一个拦截器。我使用的是stripes框架。 此拦截器拦截来自浏览器的所有reuqest。我想要一个bean类绕过这个拦截器

@Intercepts(LifecycleStage.BindingAndValidation)
public class XssInterceptor implements Interceptor

您可以在截取方法中使用以下代码:

@Override
public Resolution intercept(ExecutionContext context) throws Exception {
    if (!(context.getActionBean() instanceof BypassedActionBean)) {
        // XSS filtering
    }
    return context.proceed();
}