mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-18 05:25:50 +00:00
change the database from hsqldb to mysql and the mysql is hosted by
aliyun.
This commit is contained in:
parent
2048ee7531
commit
965ef801de
2 changed files with 22 additions and 16 deletions
8
pom.xml
8
pom.xml
|
@ -210,13 +210,19 @@
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- Databases - Uses HSQL by default -->
|
<!-- Databases - Uses HSQL by default -->
|
||||||
<!-- <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>${mysql.version}</version> </dependency> -->
|
<dependency>
|
||||||
|
<groupId>mysql</groupId>
|
||||||
|
<artifactId>mysql-connector-java</artifactId>
|
||||||
|
<version>${mysql.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<!--
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.hsqldb</groupId>
|
<groupId>org.hsqldb</groupId>
|
||||||
<artifactId>hsqldb</artifactId>
|
<artifactId>hsqldb</artifactId>
|
||||||
<version>${hsqldb.version}</version>
|
<version>${hsqldb.version}</version>
|
||||||
<scope>runtime</scope>
|
<scope>runtime</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
-->
|
||||||
|
|
||||||
<!-- For MySql only -->
|
<!-- For MySql only -->
|
||||||
<!-- <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>${mysql.version}</version> </dependency> -->
|
<!-- <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>${mysql.version}</version> </dependency> -->
|
||||||
|
|
|
@ -7,35 +7,35 @@
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
# HSQL Settings
|
# HSQL Settings
|
||||||
|
|
||||||
jdbc.driverClassName=org.hsqldb.jdbcDriver
|
#jdbc.driverClassName=org.hsqldb.jdbcDriver
|
||||||
jdbc.url=jdbc:hsqldb:mem:petclinic
|
#jdbc.url=jdbc:hsqldb:mem:petclinic
|
||||||
jdbc.username=sa
|
#jdbc.username=sa
|
||||||
jdbc.password=
|
#jdbc.password=
|
||||||
|
|
||||||
# Properties that control the population of schema and data for a new data source
|
# Properties that control the population of schema and data for a new data source
|
||||||
jdbc.initLocation=classpath:db/hsqldb/initDB.sql
|
#jdbc.initLocation=classpath:db/hsqldb/initDB.sql
|
||||||
jdbc.dataLocation=classpath:db/hsqldb/populateDB.sql
|
#jdbc.dataLocation=classpath:db/hsqldb/populateDB.sql
|
||||||
|
|
||||||
# Property that determines which database to use with an AbstractJpaVendorAdapter
|
# Property that determines which database to use with an AbstractJpaVendorAdapter
|
||||||
jpa.database=HSQL
|
#jpa.database=HSQL
|
||||||
|
|
||||||
jpa.showSql=true
|
jpa.showSql=true
|
||||||
|
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
# MySQL Settings
|
# MySQL Settings
|
||||||
|
|
||||||
#jdbc.driverClassName=com.mysql.jdbc.Driver
|
jdbc.driverClassName=com.mysql.jdbc.Driver
|
||||||
#jdbc.url=jdbc:mysql://localhost:3306/petclinic
|
jdbc.url=jdbc:mysql://115.29.227.156:3306/petclinic
|
||||||
#jdbc.username=root
|
jdbc.username=root
|
||||||
#jdbc.password=
|
jdbc.password=Yang
|
||||||
|
|
||||||
# Properties that control the population of schema and data for a new data source
|
# Properties that control the population of schema and data for a new data source
|
||||||
#jdbc.initLocation=classpath:db/mysql/initDB.sql
|
jdbc.initLocation=classpath:db/mysql/initDB.sql
|
||||||
#jdbc.dataLocation=classpath:db/mysql/populateDB.sql
|
jdbc.dataLocation=classpath:db/mysql/populateDB.sql
|
||||||
|
|
||||||
# Property that determines which Hibernate dialect to use
|
# Property that determines which Hibernate dialect to use
|
||||||
# (only applied with "applicationContext-hibernate.xml")
|
# (only applied with "applicationContext-hibernate.xml")
|
||||||
#hibernate.dialect=org.hibernate.dialect.MySQLDialect
|
hibernate.dialect=org.hibernate.dialect.MySQLDialect
|
||||||
|
|
||||||
# Property that determines which database to use with an AbstractJpaVendorAdapter
|
# Property that determines which database to use with an AbstractJpaVendorAdapter
|
||||||
#jpa.database=MYSQL
|
jpa.database=MYSQL
|
||||||
|
|
Loading…
Reference in a new issue