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))
}
}
}
을 가질 수는 GET입니다.