mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-17 13:25:49 +00:00
Switched database to MySQL
This commit is contained in:
parent
2c9a37179d
commit
58ce7d6d79
2 changed files with 26 additions and 23 deletions
16
pom.xml
16
pom.xml
|
@ -75,7 +75,7 @@
|
|||
<maven.version.range>[2.2.1,3.1.0)</maven.version.range>
|
||||
<maven-war-plugin.version>2.3</maven-war-plugin.version>
|
||||
<maven-tomcat-plugin.version>2.0</maven-tomcat-plugin.version>
|
||||
<mysql.version>5.1.22</mysql.version>
|
||||
<mysql.version>5.1.23</mysql.version>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
</properties>
|
||||
|
@ -132,18 +132,19 @@
|
|||
<groupId>commons-dbcp</groupId>
|
||||
<artifactId>commons-dbcp</artifactId>
|
||||
</dependency>
|
||||
<!--
|
||||
<dependency>
|
||||
<groupId>org.hsqldb</groupId>
|
||||
<artifactId>hsqldb</artifactId>
|
||||
</dependency>
|
||||
-->
|
||||
<!-- MySQL JDBC Connector -->
|
||||
<!--
|
||||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
<version>${mysql.version}</version>
|
||||
</dependency>
|
||||
-->
|
||||
|
||||
<!-- Hibernate JPA Provider -->
|
||||
<dependency>
|
||||
<groupId>org.hibernate</groupId>
|
||||
|
@ -830,17 +831,18 @@
|
|||
</dependency>
|
||||
|
||||
<!-- Databases - Uses HSQL by default -->
|
||||
<!-- <dependency>
|
||||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
<version>${mysql.version}</version>
|
||||
</dependency> -->
|
||||
<dependency>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<!-- <dependency>
|
||||
<groupId>org.hsqldb</groupId>
|
||||
<artifactId>hsqldb</artifactId>
|
||||
<version>${hsqldb.version}</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
</dependency> -->
|
||||
<dependency>
|
||||
<groupId>javax.servlet.jsp.jstl</groupId>
|
||||
<artifactId>jstl-api</artifactId>
|
||||
|
|
|
@ -7,35 +7,36 @@
|
|||
#-------------------------------------------------------------------------------
|
||||
# HSQL Settings
|
||||
|
||||
jdbc.driverClassName=org.hsqldb.jdbcDriver
|
||||
jdbc.url=jdbc:hsqldb:mem:petclinic
|
||||
jdbc.username=sa
|
||||
jdbc.password=
|
||||
#jdbc.driverClassName=org.hsqldb.jdbcDriver
|
||||
#jdbc.url=jdbc:hsqldb:mem:petclinic
|
||||
#jdbc.username=sa
|
||||
#jdbc.password=
|
||||
|
||||
# Properties that control the population of schema and data for a new data source
|
||||
jdbc.initLocation=classpath:db/hsqldb/initDB.sql
|
||||
jdbc.dataLocation=classpath:db/hsqldb/populateDB.sql
|
||||
#jdbc.initLocation=classpath:db/hsqldb/initDB.sql
|
||||
#jdbc.dataLocation=classpath:db/hsqldb/populateDB.sql
|
||||
|
||||
# Property that determines which database to use with an AbstractJpaVendorAdapter
|
||||
jpa.database=HSQL
|
||||
#jpa.database=HSQL
|
||||
|
||||
jpa.showSql=true
|
||||
#jpa.showSql=true
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# MySQL Settings
|
||||
|
||||
#jdbc.driverClassName=com.mysql.jdbc.Driver
|
||||
#jdbc.url=jdbc:mysql://localhost:3306/petclinic
|
||||
#jdbc.username=root
|
||||
#jdbc.password=
|
||||
jdbc.driverClassName=com.mysql.jdbc.Driver
|
||||
jdbc.url=jdbc:mysql://localhost:3306/petclinic
|
||||
jdbc.username=root
|
||||
jdbc.password=
|
||||
|
||||
# Properties that control the population of schema and data for a new data source
|
||||
#jdbc.initLocation=classpath:db/mysql/initDB.txt
|
||||
#jdbc.dataLocation=classpath:db/mysql/populateDB.txt
|
||||
jdbc.initLocation=classpath:db/mysql/initDB.sql
|
||||
jdbc.dataLocation=classpath:db/mysql/populateDB.sql
|
||||
|
||||
# Property that determines which Hibernate dialect to use
|
||||
# (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
|
||||
#jpa.database=MYSQL
|
||||
jpa.database=MYSQL
|
||||
jpa.showSql=false
|
||||
|
|
Loading…
Reference in a new issue