From d48c414a647427d4fb586c0f362f52e6f5fa2bd8 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Fri, 2 Jun 2017 16:35:44 +0200 Subject: [PATCH] Use HikariCP is jdbc and jpa starters This commit is a companion of what was done in #6013. As HikariCP is now the default connection pool, the jdbc and jpa starters no longer provide `tomcat-jdbc`, but rather `HikariCP`. Closes gh-9392 --- spring-boot-devtools/pom.xml | 10 +++++----- ...vToolsEmbeddedDataSourceAutoConfigurationTests.java | 2 +- .../src/main/asciidoc/spring-boot-features.adoc | 2 +- spring-boot-starters/spring-boot-starter-jdbc/pom.xml | 4 ++-- .../src/main/resources/META-INF/spring.provides | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/spring-boot-devtools/pom.xml b/spring-boot-devtools/pom.xml index 86b2c09f0a..08dd357468 100644 --- a/spring-boot-devtools/pom.xml +++ b/spring-boot-devtools/pom.xml @@ -112,6 +112,11 @@ h2 test + + com.zaxxer + HikariCP + test + org.springframework spring-webmvc @@ -183,10 +188,5 @@ thymeleaf-layout-dialect test - - org.apache.tomcat - tomcat-jdbc - test - diff --git a/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/autoconfigure/DevToolsEmbeddedDataSourceAutoConfigurationTests.java b/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/autoconfigure/DevToolsEmbeddedDataSourceAutoConfigurationTests.java index 52b2a53eeb..46c4a7f69a 100644 --- a/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/autoconfigure/DevToolsEmbeddedDataSourceAutoConfigurationTests.java +++ b/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/autoconfigure/DevToolsEmbeddedDataSourceAutoConfigurationTests.java @@ -38,7 +38,7 @@ import static org.mockito.Mockito.verify; * @author Andy Wilkinson */ @RunWith(ModifiedClassPathRunner.class) -@ClassPathExclusions("tomcat-jdbc-*.jar") +@ClassPathExclusions("HikariCP-*.jar") public class DevToolsEmbeddedDataSourceAutoConfigurationTests extends AbstractDevToolsDataSourceAutoConfigurationTests { diff --git a/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc b/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc index 13cc163f93..d40b998897 100644 --- a/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc +++ b/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc @@ -2829,7 +2829,7 @@ Here's the algorithm for choosing a specific implementation: DBCP2 is available we will use it. If you use the `spring-boot-starter-jdbc` or `spring-boot-starter-data-jpa` -'`starters`' you will automatically get a dependency to `tomcat-jdbc`. +'`starters`' you will automatically get a dependency to `HikariCP`. NOTE: You can bypass that algorithm completely and specify the connection pool to use via the `spring.datasource.type` property. This is especially important if you are running diff --git a/spring-boot-starters/spring-boot-starter-jdbc/pom.xml b/spring-boot-starters/spring-boot-starter-jdbc/pom.xml index 2671ce7c09..2c15313df7 100644 --- a/spring-boot-starters/spring-boot-starter-jdbc/pom.xml +++ b/spring-boot-starters/spring-boot-starter-jdbc/pom.xml @@ -23,8 +23,8 @@ spring-boot-starter - org.apache.tomcat - tomcat-jdbc + com.zaxxer + HikariCP org.springframework diff --git a/spring-boot-starters/spring-boot-starter-jdbc/src/main/resources/META-INF/spring.provides b/spring-boot-starters/spring-boot-starter-jdbc/src/main/resources/META-INF/spring.provides index a30cd7d637..d33ab006e8 100644 --- a/spring-boot-starters/spring-boot-starter-jdbc/src/main/resources/META-INF/spring.provides +++ b/spring-boot-starters/spring-boot-starter-jdbc/src/main/resources/META-INF/spring.provides @@ -1 +1 @@ -provides: spring-jdbc,spring-tx,tomcat-jdbc \ No newline at end of file +provides: spring-jdbc,spring-tx,HikariCP \ No newline at end of file