【问题标题】:Action in Play 2.3 can't find the call functionAction in Play 2.3 找不到调用函数
【发布时间】:2015-02-15 19:38:06
【问题描述】:

我正在将一个有效的 play 2.2.4 项目迁移到 play 2.3.7。我有一个对用户进行身份验证的 Authenticate 注释。问题是它没有编译并返回AuthenticationAction is not abstract and does not override abstract method call(context) in Action

以下代码是我正在运行的(我已经删除了这里复杂的身份验证代码(错误仍然存​​在)):

public class AuthenticateAction extends Action<Authenticate> {
    @Overrirde
    public F.Promise<SimpleResult> call(Http.Context ctx) throws Throwable {
         return delegate.call(ctx);
    }
}

@With(AuthenticatenAction.class)
@RetentionPolicy(Retention.RUNTIME)
public @interface Authenticate {
    String value();
}

【问题讨论】:

    标签: playframework playframework-2.2 playframework-2.3


    【解决方案1】:

    发现在play 2.3中action的call函数使用Result而不是SimpleResult,所以切换到Result就可以解决问题了。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2022-09-17
      • 2017-10-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-03-21
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多