【发布时间】:2015-09-02 11:09:17
【问题描述】:
我有一个简单的喷雾服务演员
class SimplService(service: AService) extends HttpServiceActor
with MyJsonProtocol
with SprayJsonSupport {
override def receive: Receive = runRoute {
path("a") {
get {
parameter('param.as[String]) { p =>
complete {
service.foo(p)
}
}
}
}
}
}
AService 的 foo 方法返回 Future[List[SomeClass]]
MyJsonProtocol(当然是从 DefaultJsonProtocol 扩展而来)为SomeClass 声明了一个隐含的 jsonFormat
在 intellij idea 中运行时出现这样的编译时错误
could not find implicit value for parameter marshaller: spray.httpx.marshalling.ToResponseMarshaller[scala.concurrent.Future[List[SomeClass]]]
我做错了什么?
【问题讨论】:
标签: scala intellij-idea spray