bulunamıyor:Framework 2.1 oyna - Böyle bir webservice arıyorum örtük bir ExecutionContext
WS
.url(url)
.get
.map { response => // error occurs on this line
response.status match {
case 200 => Right(response.json)
case status => Left(s"Problem accessing api, status '$status'")
}
}
komple hatası: Error: Cannot find an implicit ExecutionContext, either require one yourself or import ExecutionContext.Implicits.global
. Bazı insanlar bunun Scala küresel bağlamı ile aynı şey olduğunu düşünüyor. Ancak değil. [Execution.scala] (https://github.com/playframework/playframework/blob/2.2.x/framework/src/play/src/main/scala/play/api/libs/concurrent/Execution.scala) https://github.com/playframework/playframework/blob/2.2.x/framework/src/play/src/main/scala/play/core/system/Invoker.scala?source ([Invoker.scala] işaret = cc) Bu, aslında Oyun oyuncularının yürütme bağlamıdır. Bu, application.conf – EECOLOR
'u kullanarak davranışı değiştirmenize izin verir. "Bu sorun" bağlantısı artık kesildi. Web.archive üzerinde bir arşiv var: http://web.archive.org/web/20140222113140/http://play.lighthouseapp.com/projects/82401/tickets/899-error-cannot-find-an -implicit-ExecutionContext-ya-gerektiren-tek-kendinizi-ya-ithalat-executioncontextimplicitsglobal – EdgeCaseBerg
@EdgeCaseBerg tekrar raporlama için – EECOLOR