스프레이로 나머지 API를 개발하고 있습니다. 웹 클라이언트에서 보고서를 다운로드해야합니다.스프레이가 클라이언트에게 xls 파일을 보내십시오.
엑셀 발전기 방법은 준비가되어 있지만, 스프레이의 "getFromFile (fileFullPath)"지고 "내부 서버 오류"
어떤 아이디어? 여기
내 스프레이 코드 :(ctx: RequestContext) => {
val actor = actorRefFactory.actorOf(Props(new Actor {
def receive = {
case GetAnualReport(year, generateExcel) =>
val flujoActor = context.actorOf(Props[FlujoActor])
flujoActor ! GetAnualReport(year, generateExcel)
case ReporteResponse(path) =>
println("FILE: "+path)
getFromFile(path)
}
}))
actor ! GetAnualReport(year, true)
}
출력 :
FILE: /tmp/flujocaja-reports-5627299217173924055/reporte-anual.xls
HTTP/1.1 500 Internal Server Error
이것은 다소 복잡한 설정입니다. 이런 식으로 경로를 만든 이유는 무엇입니까? "요청 당 액자"를 수행하는 방법에 대한 게시물을 보았습니까? 예 : https://skillsmatter.com/skillscasts/4714-scala-does-the-catwalk#video 또는 https://github.com/NET-A-PORTER/spray-actor-per-request – jrudolph