I am trying to connect to a mysql database using the play framework. From my own searching, I know I need to add this line somewhere:
"mysql" % "mysql-connector-java" % "5.1.18"
However, in every documentation/similar question it says that this line either goes into the Build.scala
file or the build.sbt
file and I have neither of those files. When I created my application (as a java app) it only gave me a build.properties
and plugins.sbt
which are inside the project folder.
Does anyone know how where to add this line? Do I need to create one of those files?
My build.properties
file:
sbt.version=0.13.0
And
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")
UPDATE: After adding
addSbtPlugin("mysql" % "mysql-connector-java" % "5.1.18")
to my plugins file:
Add this line in plugin.sbt
addSbtPlugin("mysql" % "mysql-connector-java" % "5.1.18")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With