mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-04-24 19:32:48 +00:00
migrated from commons-dbcp to tomcat-jdbc
This commit is contained in:
parent
b8b8e5a4ba
commit
d1cc655aae
2 changed files with 12 additions and 7 deletions
13
pom.xml
13
pom.xml
|
@ -33,7 +33,7 @@
|
|||
<hibernate-validator.version>4.3.1.Final</hibernate-validator.version>
|
||||
|
||||
<!-- Database access -->
|
||||
<commons-dbcp.version>1.4</commons-dbcp.version>
|
||||
<tomcat-jdbc.version>7.0.37</tomcat-jdbc.version>
|
||||
<ehcache.version>2.6.6</ehcache.version>
|
||||
<hsqldb.version>2.2.9</hsqldb.version>
|
||||
|
||||
|
@ -159,11 +159,14 @@
|
|||
</dependency>
|
||||
|
||||
|
||||
<!-- Database connection pool -->
|
||||
<!-- Database connection pool
|
||||
See here for more details on commons-dbcp versus tomcat-jdbc:
|
||||
http://blog.ippon.fr/2013/03/13/improving-the-performance-of-the-spring-petclinic-sample-application-part-3-of-5/
|
||||
-->
|
||||
<dependency>
|
||||
<groupId>commons-dbcp</groupId>
|
||||
<artifactId>commons-dbcp</artifactId>
|
||||
<version>${commons-dbcp.version}</version>
|
||||
<groupId>org.apache.tomcat</groupId>
|
||||
<artifactId>tomcat-jdbc</artifactId>
|
||||
<version>${tomcat-jdbc.version}</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
|
||||
|
|
|
@ -19,8 +19,10 @@
|
|||
<!-- (in this case, JDBC-related settings for the dataSource definition below) -->
|
||||
<context:property-placeholder location="classpath:spring/data-access.properties"/>
|
||||
|
||||
<!-- DataSource configuration for Apache Commons DBCP. -->
|
||||
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close"
|
||||
<!-- DataSource configuration for the tomcat jdbc connection pool
|
||||
See here for more details on commons-dbcp versus tomcat-jdbc:
|
||||
http://blog.ippon.fr/2013/03/13/improving-the-performance-of-the-spring-petclinic-sample-application-part-3-of-5/-->
|
||||
<bean id="dataSource" class="org.apache.tomcat.jdbc.pool.DataSource"
|
||||
p:driverClassName="${jdbc.driverClassName}" p:url="${jdbc.url}"
|
||||
p:username="${jdbc.username}" p:password="${jdbc.password}"/>
|
||||
|
||||
|
|
Loading…
Reference in a new issue