From 8ecec7e511a884953979dd6e09d613ab06c31419 Mon Sep 17 00:00:00 2001 From: Dave Syer Date: Thu, 12 Sep 2013 11:53:57 -0700 Subject: [PATCH] Include Tomcat JDBC preferentially if using starter-poms When user deploys app as a WAR in Tomcat, unless the tomcat-jdbc.jar is in the app package, it will be found in the parent first and then be unable to load the Driver class. [Fixes #56720610] [bs-316] Tomcat non-embedded cannot load SQL driver class --- spring-boot-starters/pom.xml | 1 + .../spring-boot-starter-data-jpa/pom.xml | 9 ++++--- .../spring-boot-starter-jdbc/.gitignore | 1 + .../spring-boot-starter-jdbc/pom.xml | 25 +++++++++++++++++++ .../spring-boot-starter-parent/pom.xml | 5 ++++ 5 files changed, 37 insertions(+), 4 deletions(-) create mode 100644 spring-boot-starters/spring-boot-starter-jdbc/.gitignore create mode 100644 spring-boot-starters/spring-boot-starter-jdbc/pom.xml diff --git a/spring-boot-starters/pom.xml b/spring-boot-starters/pom.xml index b3d5a50e833..8bb8da79abe 100644 --- a/spring-boot-starters/pom.xml +++ b/spring-boot-starters/pom.xml @@ -19,6 +19,7 @@ spring-boot-starter-batch spring-boot-starter-data-jpa spring-boot-starter-integration + spring-boot-starter-jdbc spring-boot-starter-jetty spring-boot-starter-logging spring-boot-starter-actuator diff --git a/spring-boot-starters/spring-boot-starter-data-jpa/pom.xml b/spring-boot-starters/spring-boot-starter-data-jpa/pom.xml index 91dd194f019..ce78c46d3f4 100644 --- a/spring-boot-starters/spring-boot-starter-data-jpa/pom.xml +++ b/spring-boot-starters/spring-boot-starter-data-jpa/pom.xml @@ -18,6 +18,11 @@ spring-boot-starter-aop ${project.version} + + ${project.groupId} + spring-boot-starter-jdbc + ${project.version} + org.hibernate hibernate-entitymanager @@ -26,10 +31,6 @@ org.springframework spring-orm - - org.springframework - spring-jdbc - org.springframework.data spring-data-jpa diff --git a/spring-boot-starters/spring-boot-starter-jdbc/.gitignore b/spring-boot-starters/spring-boot-starter-jdbc/.gitignore new file mode 100644 index 00000000000..ea8c4bf7f35 --- /dev/null +++ b/spring-boot-starters/spring-boot-starter-jdbc/.gitignore @@ -0,0 +1 @@ +/target diff --git a/spring-boot-starters/spring-boot-starter-jdbc/pom.xml b/spring-boot-starters/spring-boot-starter-jdbc/pom.xml new file mode 100644 index 00000000000..422ee24e25e --- /dev/null +++ b/spring-boot-starters/spring-boot-starter-jdbc/pom.xml @@ -0,0 +1,25 @@ + + + 4.0.0 + + org.springframework.boot + spring-boot-starters + 0.5.0.BUILD-SNAPSHOT + + spring-boot-starter-jdbc + jar + + ${basedir}/../.. + + + + org.springframework + spring-jdbc + + + org.apache.tomcat + tomcat-jdbc + + + diff --git a/spring-boot-starters/spring-boot-starter-parent/pom.xml b/spring-boot-starters/spring-boot-starter-parent/pom.xml index a4bb0c7ce54..45be0733526 100644 --- a/spring-boot-starters/spring-boot-starter-parent/pom.xml +++ b/spring-boot-starters/spring-boot-starter-parent/pom.xml @@ -52,6 +52,11 @@ spring-boot-starter-actuator 0.5.0.BUILD-SNAPSHOT + + org.springframework.boot + spring-boot-starter-jdbc + 0.5.0.BUILD-SNAPSHOT + org.springframework.boot spring-boot-starter-web