首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Spray与idea的集成

Spray与idea的集成
EN

Stack Overflow用户
提问于 2015-09-02 19:09:17
回答 1查看 71关注 0票数 0

我有一个简单的喷雾服务演员

代码语言:javascript
复制
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)
          }
        }
      }
    }
  }
}

服务的foo方法返回Future[List[SomeClass]]MyJsonProtocol(当然是从DefaultJsonProtocol扩展而来)中为SomeClass声明了一个隐含的jsonFormat

当在intellij idea中运行时,我得到这样的编译时错误

代码语言:javascript
复制
could not find implicit value for parameter marshaller: spray.httpx.marshalling.ToResponseMarshaller[scala.concurrent.Future[List[SomeClass]]]

我哪里做错了?

EN

回答 1

Stack Overflow用户

发布于 2015-09-02 21:25:53

已解决的

问题在于缺少隐式的执行上下文。IMHO,错误消息可能更好

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/32351517

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档