A binding to play.api.db.DBApi was already configured, evolutions and injector error with play-slick

一世执手 提交于 2019-11-30 17:07:12

If you are like me, you have something like this in your build.sbt

libraryDependencies ++= Seq(
  jdbc,
  cache,
  ws,
  specs2 % Test,
  "mysql" % "mysql-connector-java" % "5.1.37",
  "com.typesafe.play" %% "play-slick" % "1.1.1",
  "com.typesafe.play" %% "play-slick-evolutions" % "1.1.1"
)

remove jdbc

libraryDependencies ++= Seq(
  //jdbc, //<<---- this one here
  cache,

You have probably added dependency to jdbc which doesn't make sense if you use slick for it. Remove it and it will work.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!