1.application.conf中配置数据库
:
db.default.driver=com.mysql.jdbc.Driver
db.default.url="mysql://root:secret@localhost/myDatabase"
2.添加依赖
val appDependencies = Seq(
// Add your project dependencies here,
...
"mysql" % "mysql-connector-java" % "5.1.18"
...
)
原文:http://www.cnblogs.com/haoxw/p/3887344.html