Based on the documentation here: https://www.playframework.com/documentation/2.7.x/ScalaDatabase
Step 1. use sbt new to create a new play 2.7 application
Step 2. copy the default.db {} config block seetting url, username, password, driver in your application.conf
Step 3. in your default HomeController get an injected Database using dependency injection like advertised (db :Database)
Step 4. use db.withConnection {} in an Action to do something
Step 5. Run program, observe it working and interacting with database.
Step 6. Come back 30 minutes later, observe it failing to get any connections, even though the app isn’t supposed to do any management of database connections and it’s all supposed to be handled itself.
Tested with mariadb and sqllite.