mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-12-27 17:37:27 +00:00
Clarify the docs on mysql
This commit is contained in:
parent
02adb1d49f
commit
e157f200f8
2 changed files with 16 additions and 2 deletions
|
|
@ -11,7 +11,19 @@
|
|||
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).
|
||||
locally):
|
||||
|
||||
$ docker-compose up
|
||||
...
|
||||
mysql_1_eedb4818d817 | MySQL init process done. Ready for start up.
|
||||
...
|
||||
|
||||
2) Create the PetClinic database and user by executing the "db/mysql/{schema,data}.sql"
|
||||
scripts (or set "spring.datasource.initialize=true" the first time you run the app).
|
||||
scripts (or set "spring.datasource.initialize=always" the first time you run the app).
|
||||
|
||||
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).
|
||||
|
||||
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 by the docker-compose
|
||||
configuration provided, or by the `schema.sql` if you can run that as root.
|
||||
Loading…
Add table
Add a link
Reference in a new issue