From 68dfdddd4dd88990e4202dc27f426014ef2b55c3 Mon Sep 17 00:00:00 2001 From: jmformenti Date: Sun, 17 Mar 2024 19:19:43 +0100 Subject: [PATCH] chore: Obsolete documentation removed --- readme.md | 3 -- .../db/mysql/petclinic_db_setup_mysql.txt | 36 ------------------- .../postgres/petclinic_db_setup_postgres.txt | 19 ---------- 3 files changed, 58 deletions(-) delete mode 100644 src/main/resources/db/mysql/petclinic_db_setup_mysql.txt delete mode 100644 src/main/resources/db/postgres/petclinic_db_setup_postgres.txt diff --git a/readme.md b/readme.md index 0f57d9f5b..03cfcf636 100644 --- a/readme.md +++ b/readme.md @@ -61,9 +61,6 @@ or ./mvnw spring-boot:run -Dspring-boot.run.profiles=postgres ``` -Further documentation is provided for [MySQL](https://github.com/spring-projects/spring-petclinic/blob/main/src/main/resources/db/mysql/petclinic_db_setup_mysql.txt) -and [PostgreSQL](https://github.com/spring-projects/spring-petclinic/blob/main/src/main/resources/db/postgres/petclinic_db_setup_postgres.txt). - ## Test Applications At development time we recommend you use the test applications set up as `main()` methods in `PetClinicIntegrationTests` (using the default H2 database and also adding Spring Boot Devtools), `MySqlTestApplication` and `PostgresIntegrationTests`. These are set up so that you can run the apps in your IDE to get fast feedback and also run the same classes as integration tests against the respective database. The MySql integration tests use Testcontainers to start the database in a Docker container, and the Postgres tests use Docker Compose to do the same thing. diff --git a/src/main/resources/db/mysql/petclinic_db_setup_mysql.txt b/src/main/resources/db/mysql/petclinic_db_setup_mysql.txt deleted file mode 100644 index 8b39c07a4..000000000 --- a/src/main/resources/db/mysql/petclinic_db_setup_mysql.txt +++ /dev/null @@ -1,36 +0,0 @@ -================================================================================ -=== Spring PetClinic sample application - MySQL Configuration === -================================================================================ - -@author Sam Brannen -@author Costin Leau -@author Dave Syer - --------------------------------------------------------------------------------- - -1) Download and install the MySQL database (e.g., MySQL Community Server 5.1.x), - which can be found here: https://dev.mysql.com/downloads/. Or run the - "docker-compose.yml" from the root of the project (if you have docker installed - locally): - - $ docker-compose up - ... - mysql_1_eedb4818d817 | MySQL init process done. Ready for start up. - ... - -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.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 - - 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 -docker-compose configuration provided, or by the `user.sql` script if you run that as -root. diff --git a/src/main/resources/db/postgres/petclinic_db_setup_postgres.txt b/src/main/resources/db/postgres/petclinic_db_setup_postgres.txt deleted file mode 100644 index a998749f0..000000000 --- a/src/main/resources/db/postgres/petclinic_db_setup_postgres.txt +++ /dev/null @@ -1,19 +0,0 @@ -=============================================================================== -=== Spring PetClinic sample application - PostgreSQL Configuration === -=============================================================================== - --------------------------------------------------------------------------------- - -1) Run the "docker-compose.yml" from the root of the project: - - $ docker-compose up - ... - spring-petclinic-postgres-1 | The files belonging to this database system will be owned by user "postgres". - ... - -2) Run the app with `spring.profiles.active=postgres` (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 - - mvn spring-boot:run -Dspring-boot.run.profiles=postgres - - To activate the profile on the command line.