rozpylacz Marshaller w przypadku kontraktów futures, które nie są ukryte po aktualizacji do sprayu 1.2
Po aktualizacji do sprayu 1.2 mam problem z moimi JSON-Marshallerami, które doskonale współpracują z 1.1. Wykonywanie następujących czynności wewnątrz usługi HttpService
trait TestHttpService extends HttpService with SprayJsonSupport with DefaultJsonProtocol{ self : ActorLogging =>
case class Test(hallo: String, test: String)
implicit val storyJsonFormat = jsonFormat2(Test.apply)
def test(implicit m : Marshaller[Future[Test]]) = 17
def hallo = test
}
prowadzi do następującego błędu:
could not find implicit value for parameter marshaller:
spray.httpx.marshalling.Marshaller[scala.concurrent.Future[amanuensis.story.Story]]
Kiedy usuwam przyszłość, wszystko działa dobrze:
trait TestHttpService extends HttpService with SprayJsonSupport with DefaultJsonProtocol { self : ActorLogging =>
case class Test(hallo: String, test: String)
implicit val storyJsonFormat = jsonFormat2(Test.apply)
def test(implicit m : Marshaller[Test]) = 17
def hallo = test
}
Sama Marshaller for Story wydaje się być ukryta. Jestem teraz zdezorientowany, ponieważ nigdy nie musiałem robić niczego innego, aby móc złożyć przyszłość w przyszłości.
Naprawdę doceniłbym wskazówkę, co robię źle tutaj ...