Skip to content

Instantly share code, notes, and snippets.

@marisnb
Created July 26, 2019 11:17
Show Gist options
  • Save marisnb/6d08621442a50b33f2104f42f9df9d86 to your computer and use it in GitHub Desktop.
Save marisnb/6d08621442a50b33f2104f42f9df9d86 to your computer and use it in GitHub Desktop.
Spring boot and Postgres connection properties with our own Schema and flyway schema config
spring.jpa.hibernate.ddl-auto = validate
spring.datasource.url = jdbc:postgresql://localhost:5432/db_name
spring.datasource.username = postgres
spring.datasource.password = postgres
spring.datasource.testOnBorrow = true
spring.datasource.validationQuery = SELECT 1
spring.jpa.properties.hibernate.default_schema = db_schema_name
spring.flyway.schemas = db_schema_name
spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.PostgreSQL93Dialect
spring.jpa.show-sql = true
spring.jpa.properties.hibernate.temp.use_jdbc_metadata_defaults = false
spring.main.banner-mode = off
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment