aka-httpからオプションの結果を返すときに問題が発生しています。いただければ幸いですオプションの結果がakka-http
[error] found : scala.concurrent.Future[akka.http.scaladsl.server.StandardRoute]
[error] required: akka.http.scaladsl.server.Route
[error] (which expands to) akka.http.scaladsl.server.RequestContext => scala.concurrent.Future[akka.http.scaladsl.server.RouteResult]
[error] contactService.getById(id).map {
すべてのヘルプ:
は、基本的には私との誤差を与える404pathPrefix("contacts"/Segment) { id =>
get {
contactService.getById(id).map {
case Some(c: ContactDto) => complete(OK -> toResource(c))
case None => complete(HttpResponse(NotFound))
}
}
}
がある可能性があります取得です。