mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2026-01-06 10:31:11 +00:00
Make mysql configuration more first class
This commit is contained in:
parent
8b76a54814
commit
0c7db646ef
4 changed files with 26 additions and 7 deletions
7
src/main/resources/application-mysql.properties
Normal file
7
src/main/resources/application-mysql.properties
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
# database init, supports mysql too
|
||||
database=mysql
|
||||
spring.datasource.url=jdbc:mysql://localhost/test
|
||||
spring.datasource.username=root
|
||||
spring.datasource.password=root
|
||||
# Uncomment this the first time the app runs
|
||||
# spring.datasource.initialize=true
|
||||
|
|
@ -9,11 +9,9 @@
|
|||
--------------------------------------------------------------------------------
|
||||
|
||||
1) Download and install the MySQL database (e.g., MySQL Community Server 5.1.x),
|
||||
which can be found here: http://dev.mysql.com/downloads/
|
||||
which can be found here: http://dev.mysql.com/downloads/. Or run the
|
||||
"docker-compose.yml" from the root of the project (if you have docker installed
|
||||
locally).
|
||||
|
||||
2) Add the MySQL JDBC driver to your classpath.
|
||||
|
||||
3) Set "database=mysql" in "application.properties"
|
||||
|
||||
4) 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.
|
||||
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).
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue