Skip to content

Instantly share code, notes, and snippets.

@pteacher
Created March 9, 2023 09:15
Show Gist options
  • Save pteacher/0de0b286c9abf65c7d7ae161cb7014bb to your computer and use it in GitHub Desktop.
Save pteacher/0de0b286c9abf65c7d7ae161cb7014bb to your computer and use it in GitHub Desktop.
Spring boot postgresql properties with environment variables
spring.datasource.url=jdbc:postgresql://localhost:5432/webapp
spring.datasource.driverClassName=org.postgresql.Driver
spring.datasource.username=${SPRING_DB_USER}
spring.datasource.password=${SPRING_DB_PASS}
spring.jpa.database-platform=org.hibernate.dialect.PostgreSQLDialect
spring.jpa.hibernate.ddl-auto=create
spring.sql.init.mode=always
spring.jpa.defer-datasource-initialization=true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment