From b91e21378c218189892e964732918e1c93d9a8e2 Mon Sep 17 00:00:00 2001 From: Frank Migliorino Date: Tue, 24 Sep 2019 10:15:18 -0400 Subject: [PATCH 1/2] Fix docs for setting profiles Add using -Dspring-boot.run.jvmArguments to the notes for how to set up using MySQL. --- src/main/resources/db/mysql/petclinic_db_setup_mysql.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/resources/db/mysql/petclinic_db_setup_mysql.txt b/src/main/resources/db/mysql/petclinic_db_setup_mysql.txt index 29bb601fe..f7ae6777c 100644 --- a/src/main/resources/db/mysql/petclinic_db_setup_mysql.txt +++ b/src/main/resources/db/mysql/petclinic_db_setup_mysql.txt @@ -24,7 +24,11 @@ because the petclinic user is already set up if you use the provided `docker-compose.yaml`. 3) Run the app with `spring.profiles.active=mysql` (e.g. as a System property via the command - line, but any way that sets that property in a Spring Boot app should work). + line, but any way that sets that property in a Spring Boot app should work). For example use + + mvn spring-boot:run -Dspring-boot.run.profiles=mysql + + To activate the profile on the command line. N.B. the "petclinic" database has to exist for the app to work with the JDBC URL value as it is configured by default. This condition is taken care of automatically by the From e7c879ed3abe10e446ff103887ad665ca6acf04e Mon Sep 17 00:00:00 2001 From: lsap <35534440+lsap@users.noreply.github.com> Date: Fri, 14 May 2021 17:00:22 +0300 Subject: [PATCH 2/2] Update petclinic_db_setup_mysql.txt Hey Team, thanks in advance! --- src/main/resources/db/mysql/petclinic_db_setup_mysql.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/db/mysql/petclinic_db_setup_mysql.txt b/src/main/resources/db/mysql/petclinic_db_setup_mysql.txt index f7ae6777c..8b39c07a4 100644 --- a/src/main/resources/db/mysql/petclinic_db_setup_mysql.txt +++ b/src/main/resources/db/mysql/petclinic_db_setup_mysql.txt @@ -21,7 +21,7 @@ 2) (Once only) create the PetClinic database and user by executing the "db/mysql/user.sql" scripts. You can connect to the database running in the docker container using `mysql -u root -h localhost --protocol tcp`, but you don't need to run the script there - because the petclinic user is already set up if you use the provided `docker-compose.yaml`. + because the petclinic user is already set up if you use the provided `docker-compose.yml`. 3) Run the app with `spring.profiles.active=mysql` (e.g. as a System property via the command line, but any way that sets that property in a Spring Boot app should work). For example use