我是scala和playframework的新手。 我的代码中有一个问题。
import play.db.jpa.JPAConfig
import play.db.jpa.JPAEntityManagerContext
import play.db.jpa.DefaultJPAApi
class MyJPAApiImpl(jpcCfg:JPAConfig, ec:JPAEntityManagerContext) extends
DefaultJPAApi {}
每次编译此代码(sbt compile
)时,都会发生以下错误:
[error] D:\playground\scala.jpa\app\donuts\jpa\DonutsJPAApi.scala:17:79: not enough arguments for constructor DefaultJPAApi: (x$1: play.db.jpa.JPAConfig, x$2: play.db.jpa.JPAEntityManagerContext)play.db.jpa.DefaultJPAApi.
[error] Unspecified value parameters x$1, x$2.
答案 0 :(得分:0)
class DonutsJPAApiImpl (jpcCfg:JPAConfig, ec:JPAEntityManagerContext) extends
DefaultJPAApi(jpcCfg,ec){}