As stated in Play Slick documentation a DatabaseConfig object can be obtained via Global Lookup:
val dbConfig = DatabaseConfigProvider.get[JdbcProfile](Play.current)
However I get the following compilation warning stating that current
is deprecated and that I should use DI instead:
[warn] C:\myapp\app\test\Test.scala:28: method current in object Play is deprecated: This is a static reference to application, use DI instead
Am I forced to use DI instead of global lookup? With the deprecation warning the database connection works fine.