我正在尝试使用play框架连接到mysql数据库.从我自己的搜索,我知道我需要在某处添加此行:
"mysql" % "mysql-connector-java" % "5.1.18"
但是,在每个文档/类似问题中,它都表示此行或者进入Build.scala
文件或build.sbt
文件,而我没有这些文件.当我创建我的应用程序(作为一个Java应用程序)时,它只给了我一个build.properties
,plugins.sbt
它在项目文件夹中.
有谁知道如何添加这条线?我需要创建其中一个文件吗?
我的build.properties
档案:
sbt.version=0.13.0
和
plugins.sbt
// Comment to get more information during initialization logLevel := Level.Warn // The Typesafe repository resolvers += "Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/" // Use the Play sbt plugin for Play projects addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.2.1")
更新:添加后
addSbtPlugin("mysql" % "mysql-connector-java" % "5.1.18")
到我的插件文件: