mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-12-27 19:07:28 +00:00
feat: created dev and prod properties, changed main properties for work with profiles
This commit is contained in:
parent
c2d2948525
commit
051af6d293
3 changed files with 25 additions and 3 deletions
9
src/main/resources/application-dev.properties
Normal file
9
src/main/resources/application-dev.properties
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
# database init, supports postgres too
|
||||
database=postgres
|
||||
spring.datasource.url=${POSTGRES_URL:jdbc:postgresql://localhost:5433/petclinic_dev}
|
||||
spring.datasource.username=${POSTGRES_USER:petclinic}
|
||||
spring.datasource.password=${POSTGRES_PASS:petclinic}
|
||||
# SQL is written to be idempotent so this is safe
|
||||
spring.sql.init.mode=always
|
||||
|
||||
spring.liquibase.contexts=dev
|
||||
9
src/main/resources/application-prod.properties
Normal file
9
src/main/resources/application-prod.properties
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
# database init, supports postgres too
|
||||
database=postgres
|
||||
spring.datasource.url=${POSTGRES_URL:jdbc:postgresql://localhost:5432/petclinic}
|
||||
spring.datasource.username=${POSTGRES_USER:petclinic}
|
||||
spring.datasource.password=${POSTGRES_PASS:petclinic}
|
||||
# SQL is written to be idempotent so this is safe
|
||||
spring.sql.init.mode=always
|
||||
|
||||
spring.liquibase.contexts=prod
|
||||
|
|
@ -1,7 +1,11 @@
|
|||
# database init, supports mysql too
|
||||
database=h2
|
||||
spring.sql.init.schema-locations=classpath*:db/${database}/schema.sql
|
||||
spring.sql.init.data-locations=classpath*:db/${database}/data.sql
|
||||
database=dev
|
||||
spring.profiles.active=${database}
|
||||
# spring.sql.init.schema-locations=classpath*:db/${database}/schema.sql
|
||||
# spring.sql.init.data-locations=classpath*:db/${database}/data.sql
|
||||
|
||||
spring.liquibase.change-log=classpath:db/changelog/db.changelog-master.xml
|
||||
|
||||
|
||||
# Web
|
||||
spring.thymeleaf.mode=HTML
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue