From bd8385761a43d38fe333f9843ce7f564ab414f7a Mon Sep 17 00:00:00 2001 From: Mohit Kumar <162154589+mohitkumar1313@users.noreply.github.com> Date: Thu, 26 Sep 2024 21:55:14 -0400 Subject: [PATCH] Update application-postgres.properties --- .../resources/application-postgres.properties | 21 +++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/src/main/resources/application-postgres.properties b/src/main/resources/application-postgres.properties index 60889b43c..0918d2c54 100644 --- a/src/main/resources/application-postgres.properties +++ b/src/main/resources/application-postgres.properties @@ -1,6 +1,19 @@ +# PostgreSQL Configuration database=postgres -spring.datasource.url=${POSTGRES_URL:jdbc:postgresql://localhost/petclinic} -spring.datasource.username=${POSTGRES_USER:petclinic} -spring.datasource.password=${POSTGRES_PASS:petclinic} -# SQL is written to be idempotent so this is safe +spring.datasource.url=jdbc:postgresql://postgresql:5432/sampledb +spring.datasource.username=user_petclinic +spring.datasource.password=123456 +spring.datasource.driver-class-name=org.postgresql.Driver + +# SQL Initialization spring.sql.init.mode=always +spring.sql.init.schema-locations=classpath*:db/postgres/schema.sql +spring.sql.init.data-locations=classpath*:db/postgres/data.sql + +# JPA Hibernate Configuration +spring.jpa.hibernate.ddl-auto=none +spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect + +# Logging +logging.level.org.springframework=INFO +