1

在 Play 2.0->2.1 迁移后,我在 SecureSocial 中遇到顽固错误。

我正在使用以下依赖项:

"securesocial" % "securesocial_2.10" % "master-SNAPSHOT",

我启动了 play 2.1.1,进入cleanupdatecompile

编译时出现以下错误:

[error] /home/somebody/play/myproject/app/controllers/Application.scala:473: overloaded method value SecuredAction with alternatives:
[error]   (f: securesocial.core.SecuredRequest[play.api.mvc.AnyContent] => play.api.mvc.Result)play.api.mvc.Action[play.api.mvc.AnyContent] <and>
[error]   (ajaxCall: Boolean)(f: securesocial.core.SecuredRequest[play.api.mvc.AnyContent] => play.api.mvc.Result)play.api.mvc.Action[play.api.mvc.AnyContent] <and>
[error]   (authorize: securesocial.core.Authorization)(f: securesocial.core.SecuredRequest[play.api.mvc.AnyContent] => play.api.mvc.Result)play.api.mvc.Action[play.api.mvc.AnyContent] <and>
[error]   (ajaxCall: Boolean,authorize: securesocial.core.Authorization)(f: securesocial.core.SecuredRequest[play.api.mvc.AnyContent] => play.api.mvc.Result)play.api.mvc.Action[play.api.mvc.AnyContent] <and>
[error]   [A](ajaxCall: Boolean, authorize: Option[securesocial.core.Authorization], p: play.api.mvc.BodyParser[A])(f: securesocial.core.SecuredRequest[A] => play.api.mvc.Result)play.api.mvc.Action[A]
[error]  cannot be applied to ()
[error]   def shareKnowledge = SecuredAction() { implicit request =>
[error]                        ^
4

1 回答 1

1

您必须删除多余的(). 没有采用空的第一个参数列表的方法。

试试这个:

def shareKnowledge = SecuredAction { implicit request =>

他们似乎已经删除了默认值,ajaxCall因此不再有带有空第一个参数列表的方法签名。

查看此提交更改以了解详细信息:https ://github.com/jaliss/securesocial/commit/996ec756348c0e150f89358a3d2b447358288609

于 2013-04-19T04:02:48.673 回答