Skip to content

Commit

Permalink
Update application.properties
Browse files Browse the repository at this point in the history
Changed the variable values to use optional environment values instead when present.
  • Loading branch information
nhkhai committed May 2, 2024
1 parent 24f5e24 commit 7b4b516
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -69,6 +69,6 @@ springdoc.swagger-ui.path=/swagger-ui.html
# [email protected]@
# 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

0 comments on commit 7b4b516

Please sign in to comment.