Skip to content

Commit

Permalink
Switched database to MySQL
Browse files Browse the repository at this point in the history
  • Loading branch information
Julien Dubois committed Mar 1, 2013
1 parent 2c9a371 commit 58ce7d6
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 23 deletions.
16 changes: 9 additions & 7 deletions pom.xml
Expand Up @@ -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>
Expand Down Expand Up @@ -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>
Expand Down Expand Up @@ -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>
Expand Down
33 changes: 17 additions & 16 deletions src/main/resources/spring/jdbc.properties
Expand Up @@ -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

0 comments on commit 58ce7d6

Please sign in to comment.