문제

I get a tenacious error with SecureSocial after Play 2.0->2.1 migration.

I am using the following dependency:

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

I launched play 2.1.1, entered clean, update and compile.

The following error occurs during compilation:

[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]                        ^
도움이 되었습니까?

해결책

You'll have to remove the extra (). There is no method that takes an empty first parameter list.

Try with this instead:

def shareKnowledge = SecuredAction { implicit request =>

They seem to have removed the default value for ajaxCall so there is no method signature with an empty first parameter list any more.

Look at this commit change for details: https://github.com/jaliss/securesocial/commit/996ec756348c0e150f89358a3d2b447358288609

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top