我有下面的课程来检查传入的请求。
public class SecuredAction extends Action.Simple
{
@Override
public Promise<Result> call(Context ctx) throws Throwable
{
// Not doing anything now. Just interrupting it
return delegate.call(ctx);
}
}
我正在将它应用到另一个控制器上,比如
@With(SecuredAction.class)
public class TestController extends BasicController {
public Result method1(){}
public Result method2(){}
--
}
问题是,如果来自浏览器的多个请求,请求被破坏/响应被混淆。在上述情况下,当 @With(SecuredAction.class) 时,对方法 1 和方法 2 的调用仅通过其中一个用来。如果删除此注释,我不会看到此问题。它与上下文有关吗?它不是读安全的吗?正确的做法是什么?请问有什么帮助吗?