mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-20 06:45:50 +00:00
Move db URL params such that the database engine is set statically, not in the URL (#2)
Enforces the jdbc:engine rather than letting anything be specified in the environment variable. This also helps prevent errors if one were to provided EG a postgres jdbc connection string in the MYSQL_URL variable as the application runs some bootstrapping scripts depending on the database value.
This commit is contained in:
parent
251816281d
commit
8d10871531
2 changed files with 2 additions and 2 deletions
|
@ -1,6 +1,6 @@
|
|||
# database init, supports mysql too
|
||||
database=mysql
|
||||
spring.datasource.url=${MYSQL_URL:jdbc:mysql://localhost/petclinic}
|
||||
spring.datasource.url=jdbc:mysql://${MYSQL_URL:localhost/petclinic}
|
||||
spring.datasource.username=${MYSQL_USER:petclinic}
|
||||
spring.datasource.password=${MYSQL_PASS:petclinic}
|
||||
# SQL is written to be idempotent so this is safe
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
database=postgres
|
||||
spring.datasource.url=${POSTGRES_URL:jdbc:postgresql://localhost/petclinic}
|
||||
spring.datasource.url=jdbc:postgresql://${POSTGRES_URL:localhost/petclinic}
|
||||
spring.datasource.username=${POSTGRES_USER:petclinic}
|
||||
spring.datasource.password=${POSTGRES_PASS:petclinic}
|
||||
# SQL is written to be idempotent so this is safe
|
||||
|
|
Loading…
Reference in a new issue