【发布时间】:2016-05-06 15:22:02
【问题描述】:
我做了什么:
我正在尝试使用 Play 框架实现 oauth2 提供程序。我正在使用“scala-oauth2-provider”示例来执行此操作。 "https://github.com/nulab/scala-oauth2-provider"
我列出了我在应用程序中使用的版本:
播放 -- 2.5
数据库——Mysql 5.1.22
问题:
AuthCode.scala:19: 找不到参数 tm 的隐式值: scala.slick.ast.TypedType[org.joda.time.DateTime] [错误] def createdAt = columnDateTime
代码片段:
import java.util.UUID
import org.joda.time.DateTime
import scala.slick.driver.MySQLDriver.simple._
case class AuthCode(authorizationCode: String, userGuid: UUID, redirectUri: Option[String], createdAt: DateTime, scope: Option[String], clientId: Option[String], expiresIn: Int)
class AuthCodes(tag: Tag) extends Table[AuthCode](tag, "auth_codes") {
def authorizationCode = column[String]("authorization_code", O.PrimaryKey)
def userGuid = column[UUID]("user_guid")
def redirectUri = column[Option[String]]("redirect_uri")
def createdAt = column[DateTime]("created_at")
def scope = column[Option[String]]("scope")
def clientId = column[Option[String]]("client_id")
def expiresIn = column[Int]("expires_in")
def * = (authorizationCode, userGuid, redirectUri, createdAt, scope, clientId, expiresIn) <> (AuthCode.tupled, AuthCode.unapply)
}
我该如何解决这个问题?谁能帮我解决这个问题?
注意:我也尝试了解决方案https://stackoverflow.com/a/22578950/1584121。但是我遇到了同样的问题:(
【问题讨论】:
-
@cchantep 不,这并没有解决我的问题。我已经应用了这两种解决方案。但是遇到了同样的问题。
-
我已经通过添加以下导入语句解决了这个问题。导入 com.github.tototoshi.slick.MySQLJodaSupport._
标签: mysql scala oauth-2.0 playframework-2.5