Skip to content

Commit e57a85e

Browse files
committed
Create spring-boot-data-jdbc module
1 parent 51103c4 commit e57a85e

File tree

20 files changed

+81
-26
lines changed

20 files changed

+81
-26
lines changed

Diff for: settings.gradle

+1
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ include "spring-boot-project:spring-boot-couchbase"
5555
include "spring-boot-project:spring-boot-data-cassandra"
5656
include "spring-boot-project:spring-boot-data-couchbase"
5757
include "spring-boot-project:spring-boot-data-elasticsearch"
58+
include "spring-boot-project:spring-boot-data-jdbc"
5859
include "spring-boot-project:spring-boot-data-jpa"
5960
include "spring-boot-project:spring-boot-data-ldap"
6061
include "spring-boot-project:spring-boot-data-mongodb"

Diff for: spring-boot-project/spring-boot-autoconfigure-all/src/main/resources/META-INF/additional-spring-configuration-metadata.json

-6
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,6 @@
1919
"description": "Whether to enable the PersistenceExceptionTranslationPostProcessor.",
2020
"defaultValue": true
2121
},
22-
{
23-
"name": "spring.data.jdbc.repositories.enabled",
24-
"type": "java.lang.Boolean",
25-
"description": "Whether to enable JDBC repositories.",
26-
"defaultValue": true
27-
},
2822
{
2923
"name": "spring.data.r2dbc.repositories.enabled",
3024
"type": "java.lang.Boolean",

Diff for: spring-boot-project/spring-boot-autoconfigure-all/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
org.springframework.boot.autoconfigure.aop.AopAutoConfiguration
22
org.springframework.boot.autoconfigure.cache.CacheAutoConfiguration
33
org.springframework.boot.autoconfigure.dao.PersistenceExceptionTranslationAutoConfiguration
4-
org.springframework.boot.autoconfigure.data.jdbc.JdbcRepositoriesAutoConfiguration
54
org.springframework.boot.autoconfigure.data.r2dbc.R2dbcDataAutoConfiguration
65
org.springframework.boot.autoconfigure.data.r2dbc.R2dbcRepositoriesAutoConfiguration
76
org.springframework.boot.autoconfigure.data.rest.RepositoryRestMvcAutoConfiguration
+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
plugins {
2+
id "java-library"
3+
id "org.springframework.boot.auto-configuration"
4+
id "org.springframework.boot.configuration-properties"
5+
id "org.springframework.boot.deployed"
6+
id "org.springframework.boot.optional-dependencies"
7+
}
8+
9+
description = "Spring Boot Data JDBC"
10+
11+
dependencies {
12+
api(project(":spring-boot-project:spring-boot-jdbc"))
13+
api("org.springframework.data:spring-data-jdbc")
14+
15+
optional(project(":spring-boot-project:spring-boot-autoconfigure"))
16+
17+
testImplementation(project(":spring-boot-project:spring-boot-test"))
18+
testImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support"))
19+
testImplementation(testFixtures(project(":spring-boot-project:spring-boot-autoconfigure")))
20+
21+
testRuntimeOnly("ch.qos.logback:logback-classic")
22+
testRuntimeOnly("com.h2database:h2")
23+
testRuntimeOnly("com.zaxxer:HikariCP")
24+
}
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2024-2025 the original author or authors.
2+
* Copyright 2012-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package org.springframework.boot.autoconfigure.data.jdbc;
17+
package org.springframework.boot.data.jdbc.autoconfigure;
1818

1919
import org.springframework.boot.context.properties.ConfigurationProperties;
2020

Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2024 the original author or authors.
2+
* Copyright 2012-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package org.springframework.boot.autoconfigure.data.jdbc;
17+
package org.springframework.boot.data.jdbc.autoconfigure;
1818

1919
import org.springframework.data.jdbc.core.dialect.JdbcDb2Dialect;
2020
import org.springframework.data.jdbc.core.dialect.JdbcMySqlDialect;
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package org.springframework.boot.autoconfigure.data.jdbc;
17+
package org.springframework.boot.data.jdbc.autoconfigure;
1818

1919
import java.util.Optional;
2020
import java.util.Set;
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2024 the original author or authors.
2+
* Copyright 2012-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package org.springframework.boot.autoconfigure.data.jdbc;
17+
package org.springframework.boot.data.jdbc.autoconfigure;
1818

1919
import java.lang.annotation.Annotation;
2020

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2019 the original author or authors.
2+
* Copyright 2012-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -17,4 +17,4 @@
1717
/**
1818
* Auto-configuration for Spring Data JDBC.
1919
*/
20-
package org.springframework.boot.autoconfigure.data.jdbc;
20+
package org.springframework.boot.data.jdbc.autoconfigure;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"groups": [],
3+
"properties": [
4+
{
5+
"name": "spring.data.jdbc.repositories.enabled",
6+
"type": "java.lang.Boolean",
7+
"description": "Whether to enable JDBC repositories.",
8+
"defaultValue": true
9+
}
10+
]
11+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
org.springframework.boot.data.jdbc.autoconfigure.JdbcRepositoriesAutoConfiguration
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package org.springframework.boot.autoconfigure.data.jdbc;
17+
package org.springframework.boot.data.jdbc.autoconfigure;
1818

1919
import java.util.function.Function;
2020

@@ -25,9 +25,9 @@
2525

2626
import org.springframework.boot.autoconfigure.AutoConfigurations;
2727
import org.springframework.boot.autoconfigure.TestAutoConfigurationPackage;
28-
import org.springframework.boot.autoconfigure.data.empty.EmptyDataPackage;
29-
import org.springframework.boot.autoconfigure.data.jdbc.city.City;
30-
import org.springframework.boot.autoconfigure.data.jdbc.city.CityRepository;
28+
import org.springframework.boot.data.jdbc.domain.city.City;
29+
import org.springframework.boot.data.jdbc.domain.city.CityRepository;
30+
import org.springframework.boot.data.jdbc.domain.empty.EmptyDataPackage;
3131
import org.springframework.boot.jdbc.autoconfigure.DataSourceAutoConfiguration;
3232
import org.springframework.boot.jdbc.autoconfigure.DataSourceInitializationAutoConfiguration;
3333
import org.springframework.boot.jdbc.autoconfigure.DataSourceTransactionManagerAutoConfiguration;
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2019 the original author or authors.
2+
* Copyright 2012-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package org.springframework.boot.autoconfigure.data.jdbc.city;
17+
package org.springframework.boot.data.jdbc.domain.city;
1818

1919
import org.springframework.data.annotation.Id;
2020
import org.springframework.data.relational.core.mapping.Table;
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2019 the original author or authors.
2+
* Copyright 2012-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package org.springframework.boot.autoconfigure.data.jdbc.city;
17+
package org.springframework.boot.data.jdbc.domain.city;
1818

1919
import org.springframework.data.repository.CrudRepository;
2020

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/*
2+
* Copyright 2012-2025 the original author or authors.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package org.springframework.boot.data.jdbc.domain.empty;
18+
19+
public class EmptyDataPackage {
20+
21+
}

Diff for: spring-boot-project/spring-boot-dependencies/build.gradle

+1
Original file line numberDiff line numberDiff line change
@@ -2000,6 +2000,7 @@ bom {
20002000
"spring-boot-data-cassandra",
20012001
"spring-boot-data-couchbase",
20022002
"spring-boot-data-elasticsearch",
2003+
"spring-boot-data-jdbc",
20032004
"spring-boot-data-jpa",
20042005
"spring-boot-data-ldap",
20052006
"spring-boot-data-mongodb",

Diff for: spring-boot-project/spring-boot-docs/build.gradle

+2
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ dependencies {
6565
autoConfiguration(project(path: ":spring-boot-project:spring-boot-data-cassandra", configuration: "autoConfigurationMetadata"))
6666
autoConfiguration(project(path: ":spring-boot-project:spring-boot-data-couchbase", configuration: "autoConfigurationMetadata"))
6767
autoConfiguration(project(path: ":spring-boot-project:spring-boot-data-elasticsearch", configuration: "autoConfigurationMetadata"))
68+
autoConfiguration(project(path: ":spring-boot-project:spring-boot-data-jdbc", configuration: "autoConfigurationMetadata"))
6869
autoConfiguration(project(path: ":spring-boot-project:spring-boot-data-jpa", configuration: "autoConfigurationMetadata"))
6970
autoConfiguration(project(path: ":spring-boot-project:spring-boot-data-ldap", configuration: "autoConfigurationMetadata"))
7071
autoConfiguration(project(path: ":spring-boot-project:spring-boot-data-mongodb", configuration: "autoConfigurationMetadata"))
@@ -124,6 +125,7 @@ dependencies {
124125
configurationProperties(project(path: ":spring-boot-project:spring-boot-data-cassandra", configuration: "configurationPropertiesMetadata"))
125126
configurationProperties(project(path: ":spring-boot-project:spring-boot-data-couchbase", configuration: "configurationPropertiesMetadata"))
126127
configurationProperties(project(path: ":spring-boot-project:spring-boot-data-elasticsearch", configuration: "configurationPropertiesMetadata"))
128+
configurationProperties(project(path: ":spring-boot-project:spring-boot-data-jdbc", configuration: "configurationPropertiesMetadata"))
127129
configurationProperties(project(path: ":spring-boot-project:spring-boot-data-jpa", configuration: "configurationPropertiesMetadata"))
128130
configurationProperties(project(path: ":spring-boot-project:spring-boot-data-ldap", configuration: "configurationPropertiesMetadata"))
129131
configurationProperties(project(path: ":spring-boot-project:spring-boot-data-neo4j", configuration: "configurationPropertiesMetadata"))

Diff for: spring-boot-project/spring-boot-starters/spring-boot-starter-data-jdbc/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ description = "Starter for using Spring Data JDBC"
66

77
dependencies {
88
api(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-jdbc"))
9-
api("org.springframework.data:spring-data-jdbc")
9+
api(project(":spring-boot-project:spring-boot-data-jdbc"))
1010
}

Diff for: spring-boot-project/spring-boot-test-autoconfigure/build.gradle

+1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ dependencies {
3939
optional(project(":spring-boot-project:spring-boot-data-cassandra"))
4040
optional(project(":spring-boot-project:spring-boot-data-couchbase"))
4141
optional(project(":spring-boot-project:spring-boot-data-elasticsearch"))
42+
optional(project(":spring-boot-project:spring-boot-data-jdbc"))
4243
optional(project(":spring-boot-project:spring-boot-data-jpa"))
4344
optional(project(":spring-boot-project:spring-boot-data-ldap"))
4445
optional(project(":spring-boot-project:spring-boot-data-mongodb"))

Diff for: spring-boot-project/spring-boot-test-autoconfigure/src/main/resources/META-INF/spring/org.springframework.boot.test.autoconfigure.data.jdbc.AutoConfigureDataJdbc.imports

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# AutoConfigureDataJdbc auto-configuration imports
2-
org.springframework.boot.autoconfigure.data.jdbc.JdbcRepositoriesAutoConfiguration
2+
org.springframework.boot.data.jdbc.autoconfigure.JdbcRepositoriesAutoConfiguration
33
org.springframework.boot.jdbc.autoconfigure.DataSourceAutoConfiguration
44
org.springframework.boot.jdbc.autoconfigure.DataSourceInitializationAutoConfiguration
55
org.springframework.boot.jdbc.autoconfigure.DataSourceTransactionManagerAutoConfiguration

0 commit comments

Comments
 (0)