Play框架中的编译错误

时间:2018-01-24 07:00:00

标签: json scala playframework

我正在使用Play框架和Scala进行登录过程,我收到以下错误:

No Json serializer as JsObject found for type play.api.libs.json.JsValue. Try to implement an implicit OWrites or OFormat for this type

这是我的型号代码。我做错了什么?

def checkUser(user: Signin): Future[Option[Signin]] = {
  val query = BSONDocument("_email" -> user.email, "password" -> user.password)
  collection.flatMap(_.find(query).requireOne[Signin])
}

0 个答案:

没有答案