From 7b4b516817eb31e61287753676c04ce7be2ffcaa Mon Sep 17 00:00:00 2001 From: nhkhai Date: Thu, 2 May 2024 11:03:00 +0800 Subject: [PATCH] Update application.properties Changed the variable values to use optional environment values instead when present. --- src/main/resources/application.properties | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 075bbc8..c84cfd6 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -2,16 +2,16 @@ spring.application.name=smart-inventory # Server Port Configuration. # The default server port is 8080. -server.port=9090 +server.port=${PORT:9090} # Database Configuration. # PostgreSQL. -spring.datasource.url=jdbc:postgresql://localhost:5432/the_review_room -# For WSL, use postgres. +spring.datasource.url=${SPRING_DATASOURCE_URL:jdbc:postgresql://localhost:5432/the_review_room} +# For WSL, use postgres. # For Mac, use your Mac username. -spring.datasource.username=postgres +spring.datasource.username=${SPRING_DATASOURCE_USERNAME:postgres} # Password can be blank if we set it to trust in pg_hba.conf. -spring.datasource.password= +spring.datasource.password=${SPRING_DATASOURCE_PASSWORD:} # Database platform to use. spring.jpa.database-platform=org.hibernate.dialect.PostgreSQLDialect @@ -69,6 +69,6 @@ springdoc.swagger-ui.path=/swagger-ui.html # spring.profiles.active=@spring.profiles.active@ # Set the default active profile. # Use the command to activate: mvn spring-boot:run -Dspring.profiles.active=development. -spring.profiles.active=development +spring.profiles.active=${SPRING_PROFILES_ACTIVE:development} # Set the default default profile. This is the profile that is used on any bean if you don't specify the @Profile annotation to be a certain profile. # spring.profiles.default=development