From 3fd2131556942e2a7e6cfd236f034ad977d1e19f Mon Sep 17 00:00:00 2001 From: Neven Cvetkovic Date: Tue, 18 Apr 2023 15:46:06 +0200 Subject: [PATCH] Added application properties for Azure Spring Apps and PostgreSQL service connector. --- .../application-azure-postgres.properties | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/main/resources/application-azure-postgres.properties diff --git a/src/main/resources/application-azure-postgres.properties b/src/main/resources/application-azure-postgres.properties new file mode 100644 index 000000000..1ac147c3f --- /dev/null +++ b/src/main/resources/application-azure-postgres.properties @@ -0,0 +1,21 @@ +# Azure Spring Apps properties for PostgreSQL database +# +# Note you don't need to specify PostgreSQL JDBC URL, username, password, e.g. +# spring.datasource.url +# spring.datasource.username +# spring.datasource.password +# +# This automatically gets injected into the application when you configure Service Connector. +# +database=postgres +spring.sql.init.schema-locations=classpath*:db/${database}/schema.sql +spring.sql.init.data-locations=classpath*:db/${database}/data.sql +spring.sql.init.mode=always + +# +# You can use the standard environment variable JAVA_OPTS to pass the Spring active profile, e.g. +# +# az spring app deploy --name spring-petclinic --source-path . \ +# --build-env BP_JVM_VERSION=17 \ +# --env "JAVA_OPTS=-Dspring.profiles.active=azure-postgres" +# \ No newline at end of file