From 5d3b4b256e52ff53e85d862b38d9e6bb346356e9 Mon Sep 17 00:00:00 2001 From: CemTbi Date: Mon, 18 May 2026 16:08:36 +0200 Subject: [PATCH] Add PostgreSQL datasource configuration for production environment --- src/main/resources/application-dev.properties | 2 +- src/main/resources/application-prod.properties | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 src/main/resources/application-prod.properties diff --git a/src/main/resources/application-dev.properties b/src/main/resources/application-dev.properties index a199ab8..a2ad3d3 100644 --- a/src/main/resources/application-dev.properties +++ b/src/main/resources/application-dev.properties @@ -1,5 +1,5 @@ # Configure PostgreSQL datasource for development environment -spring.datasource.url=jdbc:postgresql://${DB_HOST:localhost}:5432/urlshortener +spring.datasource.url=jdbc:postgresql://localhost:5432/urlshortener spring.datasource.driverClassName=org.postgresql.Driver spring.datasource.username=postgres spring.datasource.password=postgres diff --git a/src/main/resources/application-prod.properties b/src/main/resources/application-prod.properties new file mode 100644 index 0000000..2705b54 --- /dev/null +++ b/src/main/resources/application-prod.properties @@ -0,0 +1,9 @@ +# Configure PostgreSQL datasource for development environment +spring.datasource.url=jdbc:postgresql://${DB_HOST:localhost}:5432/urlshortener +spring.datasource.driverClassName=org.postgresql.Driver +spring.datasource.username=postgres +spring.datasource.password=postgres + +# JPA/Hibernate Configuration for PostgreSQL +spring.jpa.hibernate.ddl-auto=update +spring.jpa.show-sql=true \ No newline at end of file