-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix MySQL configuration and documentation #24
- Loading branch information
Showing
7 changed files
with
75 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
spring-petclinic-server/src/main/resources/application-hsqldb.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# HSQLDB config start | ||
#---------------------------------------------------------------- | ||
|
||
spring.datasource.schema=classpath:db/hsqldb/schema.sql | ||
spring.datasource.data=classpath:db/hsqldb/data.sql | ||
|
||
spring.datasource.url=jdbc:hsqldb:mem:petclinic | ||
spring.datasource.username=sa | ||
spring.datasource.password= | ||
spring.jpa.database=HSQL | ||
spring.jpa.database-platform=org.hibernate.dialect.HSQLDialect | ||
spring.jpa.hibernate.ddl-auto=none | ||
#---------------------------------------------------------------- | ||
# HSQLDB config end |
17 changes: 17 additions & 0 deletions
17
spring-petclinic-server/src/main/resources/application-mysql.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Always initialize the datasource. | ||
# Change the value if required (see DataSourceInitializationMode) | ||
spring.datasource.initialization-mode=always | ||
spring.datasource.schema=classpath:db/mysql/schema.sql | ||
spring.datasource.data=classpath:db/mysql/data.sql | ||
|
||
# MySQL config start | ||
#---------------------------------------------------------------- | ||
spring.datasource.url = jdbc:mysql://localhost:3306/petclinic?useUnicode=true | ||
spring.datasource.username=root | ||
spring.datasource.password=petclinic | ||
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver | ||
spring.jpa.database=MYSQL | ||
spring.jpa.database-platform=org.hibernate.dialect.MySQLDialect | ||
spring.jpa.hibernate.ddl-auto=none | ||
#---------------------------------------------------------------- | ||
# MySQL config end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 0 additions & 24 deletions
24
spring-petclinic-server/src/main/resources/db/mysql/petclinic_db_setup_mysql.txt
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.