在Play 2.0-> 2.1迁移后,我在SecureSocial中遇到了一个顽固的错误。
我使用以下依赖项:
"securesocial" % "securesocial_2.10" % "master-SNAPSHOT",
我启动了播放2.1.1,输入 clean , update 和 compile 。
编译期间发生以下错误:
[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] ^
答案 0 :(得分:1)
您必须删除额外的()
。没有方法采用空的第一个参数列表。
请尝试使用此功能:
def shareKnowledge = SecuredAction { implicit request =>
他们似乎已经删除了ajaxCall
的默认值,因此没有方法签名不再包含空的第一个参数列表。
请查看此提交更改以获取详细信息:https://github.com/jaliss/securesocial/commit/996ec756348c0e150f89358a3d2b447358288609