Connect to PostgreSQL with Slick and Play!2.4

In order to start using PostgreSQL, you will first need to add its JDBC driver dependency in your build.sbt file: (you can find all the available versions here)

"org.postgresql" % "postgresql" % "9.4-1201-jdbc41"

Then you will just need to add access configurations:

slick.dbs.default.driver= "slick.driver.PostgresDriver$"
slick.dbs.default.db.driver="org.postgresql.Driver"
slick.dbs.default.db.url="jdbc:postgresql://localhost:5432/dbname"
slick.dbs.default.db.user="postgres"
slick.dbs.default.db.password=""

Laisser un commentaire

Your email address will not be published / Required fields are marked *

Ce site utilise Akismet pour réduire les indésirables. En savoir plus sur comment les données de vos commentaires sont utilisées.