1
간단한 컨트롤러로 재생 프레임 워크 2.5를 시도 할 때 발생하는 오류 메시지가 당황 할 수 있습니다. 여기에 내가 뭘하는지입니다 :간단한 프레임 워크에서 Play Framework 2.5 오류가 발생했습니다.
object UserController extends Controller {
def login = Action.async(BodyParsers.parse.json) { request =>
val body = request.body.validate[UserLogin]
// call the userService and validate the credentials
body.fold(
errors => {
BadRequest(Json.obj("status" -> "error", "message" -> JsError.toFlatJson(errors)))
}, // error here
message => {
Ok("")
} // error here
)
}
}
내가 얻을 오류 메시지가 말한다 :
"Expression of type Result does not conform to expected type _X"
나는 당신이 '비동기' – rethab