Skip to content

Commit a174794

Browse files
committed
Create spring-boot-data-r2dbc module
1 parent e57a85e commit a174794

File tree

20 files changed

+86
-33
lines changed

20 files changed

+86
-33
lines changed

Diff for: settings.gradle

+1
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ include "spring-boot-project:spring-boot-data-jpa"
6060
include "spring-boot-project:spring-boot-data-ldap"
6161
include "spring-boot-project:spring-boot-data-mongodb"
6262
include "spring-boot-project:spring-boot-data-neo4j"
63+
include "spring-boot-project:spring-boot-data-r2dbc"
6364
include "spring-boot-project:spring-boot-data-redis"
6465
include "spring-boot-project:spring-boot-dependencies"
6566
include "spring-boot-project:spring-boot-devtools"

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.r2dbc.repositories.enabled",
24-
"type": "java.lang.Boolean",
25-
"description": "Whether to enable R2DBC repositories.",
26-
"defaultValue": true
27-
},
2822
{
2923
"name" : "spring.datasource.continue-on-error",
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

-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +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.r2dbc.R2dbcDataAutoConfiguration
5-
org.springframework.boot.autoconfigure.data.r2dbc.R2dbcRepositoriesAutoConfiguration
64
org.springframework.boot.autoconfigure.data.rest.RepositoryRestMvcAutoConfiguration
75
org.springframework.boot.autoconfigure.data.web.SpringDataWebAutoConfiguration
86
org.springframework.boot.autoconfigure.graphql.GraphQlAutoConfiguration
+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
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 R2DBC"
10+
11+
dependencies {
12+
api(project(":spring-boot-project:spring-boot-r2dbc"))
13+
api("io.r2dbc:r2dbc-spi")
14+
api("io.r2dbc:r2dbc-pool")
15+
api("org.springframework.data:spring-data-r2dbc")
16+
17+
optional(project(":spring-boot-project:spring-boot-autoconfigure"))
18+
19+
testImplementation(project(":spring-boot-project:spring-boot-test"))
20+
testImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support"))
21+
testImplementation(testFixtures(project(":spring-boot-project:spring-boot-autoconfigure")))
22+
testImplementation("io.projectreactor:reactor-test")
23+
testImplementation("io.r2dbc:r2dbc-h2")
24+
25+
testRuntimeOnly("ch.qos.logback:logback-classic")
26+
}
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.r2dbc;
17+
package org.springframework.boot.data.r2dbc.autoconfigure;
1818

1919
import java.util.ArrayList;
2020
import java.util.Collections;
@@ -49,7 +49,7 @@
4949
*
5050
* @author Mark Paluch
5151
* @author Oliver Drotbohm
52-
* @since 2.3.0
52+
* @since 4.0.0
5353
*/
5454
@AutoConfiguration(after = R2dbcAutoConfiguration.class)
5555
@ConditionalOnClass({ DatabaseClient.class, R2dbcEntityTemplate.class })
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.r2dbc;
17+
package org.springframework.boot.data.r2dbc.autoconfigure;
1818

1919
import io.r2dbc.spi.ConnectionFactory;
2020

@@ -34,7 +34,7 @@
3434
* {@link EnableAutoConfiguration Auto-configuration} for Spring Data R2DBC Repositories.
3535
*
3636
* @author Mark Paluch
37-
* @since 2.3.0
37+
* @since 4.0.0
3838
* @see EnableR2dbcRepositories
3939
*/
4040
@AutoConfiguration(after = R2dbcDataAutoConfiguration.class)
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.r2dbc;
17+
package org.springframework.boot.data.r2dbc.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-2020 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 R2DBC.
1919
*/
20-
package org.springframework.boot.autoconfigure.data.r2dbc;
20+
package org.springframework.boot.data.r2dbc.autoconfigure;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"groups": [],
3+
"properties": [
4+
{
5+
"name": "spring.data.r2dbc.repositories.enabled",
6+
"type": "java.lang.Boolean",
7+
"description": "Whether to enable R2DBC repositories.",
8+
"defaultValue": true
9+
}
10+
]
11+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
org.springframework.boot.data.r2dbc.autoconfigure.R2dbcDataAutoConfiguration
2+
org.springframework.boot.data.r2dbc.autoconfigure.R2dbcRepositoriesAutoConfiguration
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@
1414
* limitations under the License.
1515
*/
1616

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

1919
import org.junit.jupiter.api.Test;
2020

2121
import org.springframework.boot.autoconfigure.AutoConfigurations;
2222
import org.springframework.boot.autoconfigure.TestAutoConfigurationPackage;
23-
import org.springframework.boot.autoconfigure.data.r2dbc.city.City;
23+
import org.springframework.boot.data.r2dbc.domain.city.City;
2424
import org.springframework.boot.r2dbc.autoconfigure.R2dbcAutoConfiguration;
2525
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
2626
import org.springframework.data.domain.ManagedTypes;
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.r2dbc;
17+
package org.springframework.boot.data.r2dbc.autoconfigure;
1818

1919
import java.time.Duration;
2020

@@ -25,9 +25,9 @@
2525
import org.springframework.beans.factory.annotation.Autowired;
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.r2dbc.city.City;
30-
import org.springframework.boot.autoconfigure.data.r2dbc.city.CityRepository;
28+
import org.springframework.boot.data.r2dbc.domain.city.City;
29+
import org.springframework.boot.data.r2dbc.domain.city.CityRepository;
30+
import org.springframework.boot.data.r2dbc.domain.empty.EmptyDataPackage;
3131
import org.springframework.boot.r2dbc.autoconfigure.R2dbcAutoConfiguration;
3232
import org.springframework.boot.test.context.FilteredClassLoader;
3333
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2020 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.r2dbc.city;
17+
package org.springframework.boot.data.r2dbc.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-2020 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.r2dbc.city;
17+
package org.springframework.boot.data.r2dbc.domain.city;
1818

1919
import org.springframework.data.repository.reactive.ReactiveCrudRepository;
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.r2dbc.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
@@ -2005,6 +2005,7 @@ bom {
20052005
"spring-boot-data-ldap",
20062006
"spring-boot-data-mongodb",
20072007
"spring-boot-data-neo4j",
2008+
"spring-boot-data-r2dbc",
20082009
"spring-boot-data-redis",
20092010
"spring-boot-devtools",
20102011
"spring-boot-docker-compose",

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

+2
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ dependencies {
7070
autoConfiguration(project(path: ":spring-boot-project:spring-boot-data-ldap", configuration: "autoConfigurationMetadata"))
7171
autoConfiguration(project(path: ":spring-boot-project:spring-boot-data-mongodb", configuration: "autoConfigurationMetadata"))
7272
autoConfiguration(project(path: ":spring-boot-project:spring-boot-data-neo4j", configuration: "autoConfigurationMetadata"))
73+
autoConfiguration(project(path: ":spring-boot-project:spring-boot-data-r2dbc", configuration: "autoConfigurationMetadata"))
7374
autoConfiguration(project(path: ":spring-boot-project:spring-boot-data-redis", configuration: "autoConfigurationMetadata"))
7475
autoConfiguration(project(path: ":spring-boot-project:spring-boot-devtools", configuration: "autoConfigurationMetadata"))
7576
autoConfiguration(project(path: ":spring-boot-project:spring-boot-elasticsearch", configuration: "autoConfigurationMetadata"))
@@ -129,6 +130,7 @@ dependencies {
129130
configurationProperties(project(path: ":spring-boot-project:spring-boot-data-jpa", configuration: "configurationPropertiesMetadata"))
130131
configurationProperties(project(path: ":spring-boot-project:spring-boot-data-ldap", configuration: "configurationPropertiesMetadata"))
131132
configurationProperties(project(path: ":spring-boot-project:spring-boot-data-neo4j", configuration: "configurationPropertiesMetadata"))
133+
configurationProperties(project(path: ":spring-boot-project:spring-boot-data-r2dbc", configuration: "configurationPropertiesMetadata"))
132134
configurationProperties(project(path: ":spring-boot-project:spring-boot-data-redis", configuration: "configurationPropertiesMetadata"))
133135
configurationProperties(project(path: ":spring-boot-project:spring-boot-devtools", configuration: "configurationPropertiesMetadata"))
134136
configurationProperties(project(path: ":spring-boot-project:spring-boot-docker-compose", configuration: "configurationPropertiesMetadata"))

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

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

77
dependencies {
88
api(project(":spring-boot-project:spring-boot-starters:spring-boot-starter"))
9-
api(project(":spring-boot-project:spring-boot-r2dbc"))
9+
api(project(":spring-boot-project:spring-boot-data-r2dbc"))
1010
api(project(":spring-boot-project:spring-boot-tx"))
11-
api("org.springframework.data:spring-data-r2dbc")
12-
api("io.r2dbc:r2dbc-spi")
13-
api("io.r2dbc:r2dbc-pool")
1411
}

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ dependencies {
4444
optional(project(":spring-boot-project:spring-boot-data-ldap"))
4545
optional(project(":spring-boot-project:spring-boot-data-mongodb"))
4646
optional(project(":spring-boot-project:spring-boot-data-neo4j"))
47+
optional(project(":spring-boot-project:spring-boot-data-r2dbc"))
4748
optional(project(":spring-boot-project:spring-boot-data-redis"))
4849
optional(project(":spring-boot-project:spring-boot-flyway"))
4950
optional(project(":spring-boot-project:spring-boot-groovy-templates"))
@@ -57,7 +58,6 @@ dependencies {
5758
exclude(group: "org.liquibase")
5859
}
5960
optional(project(":spring-boot-project:spring-boot-mongodb"))
60-
optional(project(":spring-boot-project:spring-boot-r2dbc"))
6161
optional(project(":spring-boot-project:spring-boot-tx"))
6262
optional(project(":spring-boot-project:spring-boot-validation"))
6363
optional(project(":spring-boot-project:spring-boot-webmvc"))

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# AutoConfigureDataR2dbc auto-configuration imports
2-
org.springframework.boot.autoconfigure.data.r2dbc.R2dbcRepositoriesAutoConfiguration
3-
org.springframework.boot.autoconfigure.data.r2dbc.R2dbcDataAutoConfiguration
2+
org.springframework.boot.data.r2dbc.autoconfigure.R2dbcRepositoriesAutoConfiguration
3+
org.springframework.boot.data.r2dbc.autoconfigure.R2dbcDataAutoConfiguration
44
org.springframework.boot.r2dbc.autoconfigure.R2dbcAutoConfiguration
55
org.springframework.boot.r2dbc.autoconfigure.R2dbcInitializationAutoConfiguration
66
org.springframework.boot.r2dbc.autoconfigure.R2dbcTransactionManagerAutoConfiguration

0 commit comments

Comments
 (0)