Advertisement
Guest User

db-config

a guest
Apr 6th, 2017
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. environments {
  2. production {
  3. dataSource {
  4. dbCreate = "create-drop"
  5. driverClassName = "org.postgresql.Driver"
  6. dialect = org.hibernate.dialect.PostgreSQLDialect
  7. uri = new URI(System.env.DATABASE_URL ?: "postgres://localhost:5432/test")
  8. url = "jdbc:postgresql://" + uri.host + ":" + uri.port + uri.path + "?sslmode=require"
  9. username = uri.userInfo.split(":")[0]
  10. password = uri.userInfo.split(":")[1]
  11. logSql = true
  12. formatSql = true
  13. }
  14. }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement