Je suis un débutant dans la construction d'un environnement Java, mais je suis bloqué J'ai du mal à connecter la base de données de Mysql à Playfreamwork. Continue à te battre
environnement MacOs catalina Java15 sbt 1.4.1 scala 2.13.3 mysql5.6.47
build.sbt
name := """play-scala-seed"""
organization := "com.example"
version := "1.0-SNAPSHOT"
lazy val root = (project in file(".")).enablePlugins(PlayScala)
scalaVersion := "2.13.3"
libraryDependencies += guice
libraryDependencies += "org.scalatestplus.play" %% "scalatestplus-play" % "5.0.0" % Test
libraryDependencies += jdbc
libraryDependencies += "mysql" % "mysql-connector-java" % "5.6.47"
application.conf
db.default.driver=com.mysql.jdbc.Driver
db.default.url="jdbc:mysql://localhost/play-scala-seed"
db.default.username=username
db.default.password="password"
Recommended Posts