Skip to content

Commit 11c1182

Browse files
committed
Create spring-boot-data-couchbase module
1 parent 7f23516 commit 11c1182

File tree

38 files changed

+122
-120
lines changed

38 files changed

+122
-120
lines changed

Diff for: settings.gradle

+1
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ include "spring-boot-project:spring-boot-batch"
5353
include "spring-boot-project:spring-boot-cassandra"
5454
include "spring-boot-project:spring-boot-couchbase"
5555
include "spring-boot-project:spring-boot-data-cassandra"
56+
include "spring-boot-project:spring-boot-data-couchbase"
5657
include "spring-boot-project:spring-boot-data-elasticsearch"
5758
include "spring-boot-project:spring-boot-data-jpa"
5859
include "spring-boot-project:spring-boot-data-ldap"

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ dependencies {
4040

4141
optional(project(":spring-boot-project:spring-boot-activemq"))
4242
optional(project(":spring-boot-project:spring-boot-artemis"))
43-
optional(project(":spring-boot-project:spring-boot-couchbase"))
43+
optional(project(":spring-boot-project:spring-boot-data-couchbase"))
4444
optional(project(":spring-boot-project:spring-boot-data-jpa"))
4545
optional(project(":spring-boot-project:spring-boot-data-mongodb"))
4646
optional(project(":spring-boot-project:spring-boot-data-redis"))

Diff for: spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/cache/CacheAutoConfiguration.java

+4-5
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
2626
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
2727
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
28-
import org.springframework.boot.autoconfigure.data.couchbase.CouchbaseDataAutoConfiguration;
2928
import org.springframework.boot.context.properties.EnableConfigurationProperties;
3029
import org.springframework.boot.jpa.autoconfigure.EntityManagerFactoryDependsOnPostProcessor;
3130
import org.springframework.cache.CacheManager;
@@ -51,10 +50,10 @@
5150
* @since 1.3.0
5251
* @see EnableCaching
5352
*/
54-
@AutoConfiguration(after = CouchbaseDataAutoConfiguration.class,
55-
afterName = { "org.springframework.boot.data.redis.autoconfigure.RedisAutoConfiguration",
56-
"org.springframework.boot.hazelcast.autoconfigure.HazelcastAutoConfiguration",
57-
"org.springframework.boot.jpa.autoconfigure.hibernate.HibernateJpaAutoConfiguration" })
53+
@AutoConfiguration(afterName = { "org.springframework.boot.data.couchbase.autoconfigure.CouchbaseDataAutoConfiguration",
54+
"org.springframework.boot.data.redis.autoconfigure.RedisAutoConfiguration",
55+
"org.springframework.boot.hazelcast.autoconfigure.HazelcastAutoConfiguration",
56+
"org.springframework.boot.jpa.autoconfigure.hibernate.HibernateJpaAutoConfiguration" })
5857
@ConditionalOnClass(CacheManager.class)
5958
@ConditionalOnBean(CacheAspectSupport.class)
6059
@ConditionalOnMissingBean(value = CacheManager.class, name = "cacheResolver")

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

-13
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,6 @@
1919
"description": "Whether to enable the PersistenceExceptionTranslationPostProcessor.",
2020
"defaultValue": true
2121
},
22-
{
23-
"name": "spring.data.couchbase.consistency",
24-
"type": "org.springframework.data.couchbase.core.query.Consistency",
25-
"deprecation": {
26-
"level": "error"
27-
}
28-
},
29-
{
30-
"name": "spring.data.couchbase.repositories.type",
31-
"type": "org.springframework.boot.autoconfigure.data.RepositoryType",
32-
"description": "Type of Couchbase repositories to enable.",
33-
"defaultValue": "auto"
34-
},
3522
{
3623
"name": "spring.data.jdbc.repositories.enabled",
3724
"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

-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +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.couchbase.CouchbaseDataAutoConfiguration
5-
org.springframework.boot.autoconfigure.data.couchbase.CouchbaseReactiveDataAutoConfiguration
6-
org.springframework.boot.autoconfigure.data.couchbase.CouchbaseReactiveRepositoriesAutoConfiguration
7-
org.springframework.boot.autoconfigure.data.couchbase.CouchbaseRepositoriesAutoConfiguration
84
org.springframework.boot.autoconfigure.data.jdbc.JdbcRepositoriesAutoConfiguration
95
org.springframework.boot.autoconfigure.data.r2dbc.R2dbcDataAutoConfiguration
106
org.springframework.boot.autoconfigure.data.r2dbc.R2dbcRepositoriesAutoConfiguration

Diff for: spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/alt/couchbase/ReactiveCityCouchbaseRepository.java

-24
This file was deleted.
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 Couchbase"
10+
11+
dependencies {
12+
api(project(":spring-boot-project:spring-boot-couchbase"))
13+
api("org.springframework.data:spring-data-couchbase")
14+
15+
optional(project(":spring-boot-project:spring-boot-autoconfigure"))
16+
optional(project(":spring-boot-project:spring-boot-validation"))
17+
optional("io.projectreactor:reactor-core")
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+
23+
testRuntimeOnly("ch.qos.logback:logback-classic")
24+
}
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2022 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.couchbase;
17+
package org.springframework.boot.data.couchbase.autoconfigure;
1818

1919
import com.couchbase.client.java.Cluster;
2020

Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2022 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.couchbase;
17+
package org.springframework.boot.data.couchbase.autoconfigure;
1818

1919
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
2020
import org.springframework.boot.autoconfigure.condition.ConditionalOnSingleCandidate;
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.couchbase;
17+
package org.springframework.boot.data.couchbase.autoconfigure;
1818

1919
import com.couchbase.client.java.Bucket;
2020
import jakarta.validation.Validator;
@@ -35,7 +35,7 @@
3535
*
3636
* @author Eddú Meléndez
3737
* @author Stephane Nicoll
38-
* @since 1.4.0
38+
* @since 4.0.0
3939
*/
4040
@AutoConfiguration(afterName = { "org.springframework.boot.couchbase.autoconfigure.CouchbaseAutoConfiguration",
4141
"org.springframework.boot.validation.autoconfigure.ValidationAutoConfiguration" })
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2023 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.couchbase;
17+
package org.springframework.boot.data.couchbase.autoconfigure;
1818

1919
import java.util.Collections;
2020

Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@
1414
* limitations under the License.
1515
*/
1616

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

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

2121
/**
2222
* Configuration properties for Spring Data Couchbase.
2323
*
2424
* @author Stephane Nicoll
25-
* @since 1.4.0
25+
* @since 4.0.0
2626
*/
2727
@ConfigurationProperties("spring.data.couchbase")
2828
public class CouchbaseDataProperties {
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2022 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.couchbase;
17+
package org.springframework.boot.data.couchbase.autoconfigure;
1818

1919
import com.couchbase.client.java.Cluster;
2020
import reactor.core.publisher.Flux;
@@ -30,7 +30,7 @@
3030
* support.
3131
*
3232
* @author Alex Derkach
33-
* @since 2.0.0
33+
* @since 4.0.0
3434
*/
3535
@AutoConfiguration(after = CouchbaseDataAutoConfiguration.class)
3636
@ConditionalOnClass({ Cluster.class, ReactiveCouchbaseRepository.class, Flux.class })
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2022 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.couchbase;
17+
package org.springframework.boot.data.couchbase.autoconfigure;
1818

1919
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
2020
import org.springframework.boot.autoconfigure.condition.ConditionalOnSingleCandidate;
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2022 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.couchbase;
17+
package org.springframework.boot.data.couchbase.autoconfigure;
1818

1919
import com.couchbase.client.java.Cluster;
2020
import reactor.core.publisher.Flux;
@@ -36,7 +36,7 @@
3636
* Repositories.
3737
*
3838
* @author Alex Derkach
39-
* @since 2.0.0
39+
* @since 4.0.0
4040
*/
4141
@AutoConfiguration(after = CouchbaseReactiveDataAutoConfiguration.class)
4242
@ConditionalOnClass({ Cluster.class, ReactiveCouchbaseRepository.class, Flux.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.couchbase;
17+
package org.springframework.boot.data.couchbase.autoconfigure;
1818

1919
import java.lang.annotation.Annotation;
2020

Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2022 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.couchbase;
17+
package org.springframework.boot.data.couchbase.autoconfigure;
1818

1919
import com.couchbase.client.java.Bucket;
2020

@@ -36,7 +36,7 @@
3636
*
3737
* @author Eddú Meléndez
3838
* @author Stephane Nicoll
39-
* @since 1.4.0
39+
* @since 4.0.0
4040
*/
4141
@AutoConfiguration
4242
@ConditionalOnClass({ Bucket.class, CouchbaseRepository.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.couchbase;
17+
package org.springframework.boot.data.couchbase.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-2022 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 Couchbase.
1919
*/
20-
package org.springframework.boot.autoconfigure.data.couchbase;
20+
package org.springframework.boot.data.couchbase.autoconfigure;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"groups": [],
3+
"properties": [
4+
{
5+
"name": "spring.data.couchbase.consistency",
6+
"type": "org.springframework.data.couchbase.core.query.Consistency",
7+
"deprecation": {
8+
"level": "error"
9+
}
10+
},
11+
{
12+
"name": "spring.data.couchbase.repositories.type",
13+
"type": "org.springframework.boot.autoconfigure.data.RepositoryType",
14+
"description": "Type of Couchbase repositories to enable.",
15+
"defaultValue": "auto"
16+
}
17+
]
18+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
org.springframework.boot.data.couchbase.autoconfigure.CouchbaseDataAutoConfiguration
2+
org.springframework.boot.data.couchbase.autoconfigure.CouchbaseReactiveDataAutoConfiguration
3+
org.springframework.boot.data.couchbase.autoconfigure.CouchbaseReactiveRepositoriesAutoConfiguration
4+
org.springframework.boot.data.couchbase.autoconfigure.CouchbaseRepositoriesAutoConfiguration
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,17 @@
1414
* limitations under the License.
1515
*/
1616

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

1919
import java.util.Collections;
2020

2121
import org.junit.jupiter.api.Test;
2222

2323
import org.springframework.boot.autoconfigure.AutoConfigurations;
24-
import org.springframework.boot.autoconfigure.data.couchbase.city.City;
2524
import org.springframework.boot.autoconfigure.domain.EntityScan;
2625
import org.springframework.boot.couchbase.autoconfigure.CouchbaseAutoConfiguration;
2726
import org.springframework.boot.couchbase.autoconfigure.CouchbaseProperties;
27+
import org.springframework.boot.data.couchbase.domain.city.City;
2828
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
2929
import org.springframework.boot.validation.autoconfigure.ValidationAutoConfiguration;
3030
import org.springframework.context.annotation.Bean;
@@ -110,7 +110,7 @@ CouchbaseCustomConversions myCustomConversions() {
110110
}
111111

112112
@Configuration(proxyBeanMethods = false)
113-
@EntityScan("org.springframework.boot.autoconfigure.data.couchbase.city")
113+
@EntityScan(basePackageClasses = City.class)
114114
@Import(CouchbaseMockConfiguration.class)
115115
static class EntityScanConfig {
116116

0 commit comments

Comments
 (0)