package models
import play.api._
import play.api.mvc._
import anorm._
import anorm.SqlParser._
import play.api.db.DB
import play.api.Play.current
import scala.language.postfixOps
case class User(name:String)
object User {
def insert(name:String) : Boolean={
DB.withConnection { implicit connection =>
val result:Boolean= SQL("insert into user(name,username,password) VALUES('"+name+"','"+name+"','"+name+"')").execute()
return result
}
}
}
“在上面的程序中发生了一个名为“[异常:数据库插件未注册。]”的异常。如何修复它“