mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-17 21:35:50 +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.version.range>[2.2.1,3.1.0)</maven.version.range>
|
||||||
<maven-war-plugin.version>2.3</maven-war-plugin.version>
|
<maven-war-plugin.version>2.3</maven-war-plugin.version>
|
||||||
<maven-tomcat-plugin.version>2.0</maven-tomcat-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.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||||
</properties>
|
</properties>
|
||||||
|
@ -132,18 +132,19 @@
|
||||||
<groupId>commons-dbcp</groupId>
|
<groupId>commons-dbcp</groupId>
|
||||||
<artifactId>commons-dbcp</artifactId>
|
<artifactId>commons-dbcp</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<!--
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.hsqldb</groupId>
|
<groupId>org.hsqldb</groupId>
|
||||||
<artifactId>hsqldb</artifactId>
|
<artifactId>hsqldb</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
-->
|
||||||
<!-- MySQL JDBC Connector -->
|
<!-- MySQL JDBC Connector -->
|
||||||
<!--
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>mysql</groupId>
|
<groupId>mysql</groupId>
|
||||||
<artifactId>mysql-connector-java</artifactId>
|
<artifactId>mysql-connector-java</artifactId>
|
||||||
<version>${mysql.version}</version>
|
<version>${mysql.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
-->
|
|
||||||
<!-- Hibernate JPA Provider -->
|
<!-- Hibernate JPA Provider -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.hibernate</groupId>
|
<groupId>org.hibernate</groupId>
|
||||||
|
@ -830,17 +831,18 @@
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- Databases - Uses HSQL by default -->
|
<!-- Databases - Uses HSQL by default -->
|
||||||
<!-- <dependency>
|
<dependency>
|
||||||
<groupId>mysql</groupId>
|
<groupId>mysql</groupId>
|
||||||
<artifactId>mysql-connector-java</artifactId>
|
<artifactId>mysql-connector-java</artifactId>
|
||||||
<version>${mysql.version}</version>
|
<version>${mysql.version}</version>
|
||||||
</dependency> -->
|
<scope>runtime</scope>
|
||||||
<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> -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>javax.servlet.jsp.jstl</groupId>
|
<groupId>javax.servlet.jsp.jstl</groupId>
|
||||||
<artifactId>jstl-api</artifactId>
|
<artifactId>jstl-api</artifactId>
|
||||||
|
|
|
@ -7,35 +7,36 @@
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
# 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://localhost:3306/petclinic
|
||||||
#jdbc.username=root
|
jdbc.username=root
|
||||||
#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/mysql/initDB.txt
|
jdbc.initLocation=classpath:db/mysql/initDB.sql
|
||||||
#jdbc.dataLocation=classpath:db/mysql/populateDB.txt
|
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
|
||||||
|
jpa.showSql=false
|
||||||
|
|
Loading…
Reference in a new issue