Create spring-boot-couchbase module
This commit is contained in:
committed by
Phillip Webb
parent
abfd521363
commit
42f12380da
@@ -50,6 +50,7 @@ include "spring-boot-project:spring-boot-artemis"
|
||||
include "spring-boot-project:spring-boot-autoconfigure"
|
||||
include "spring-boot-project:spring-boot-autoconfigure-all"
|
||||
include "spring-boot-project:spring-boot-batch"
|
||||
include "spring-boot-project:spring-boot-couchbase"
|
||||
include "spring-boot-project:spring-boot-data-jpa"
|
||||
include "spring-boot-project:spring-boot-dependencies"
|
||||
include "spring-boot-project:spring-boot-devtools"
|
||||
|
||||
@@ -20,6 +20,7 @@ dependencies {
|
||||
optional(project(":spring-boot-project:spring-boot-activemq"))
|
||||
optional(project(":spring-boot-project:spring-boot-amqp"))
|
||||
optional(project(":spring-boot-project:spring-boot-artemis"))
|
||||
optional(project(":spring-boot-project:spring-boot-couchbase"))
|
||||
optional(project(":spring-boot-project:spring-boot-data-jpa"))
|
||||
optional(project(":spring-boot-project:spring-boot-elasticsearch"))
|
||||
optional(project(":spring-boot-project:spring-boot-flyway"))
|
||||
|
||||
@@ -28,7 +28,6 @@ import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
|
||||
import org.springframework.boot.autoconfigure.couchbase.CouchbaseAutoConfiguration;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
|
||||
/**
|
||||
@@ -40,8 +39,8 @@ import org.springframework.context.annotation.Bean;
|
||||
* @author Andy Wilkinson Nicoll
|
||||
* @since 2.0.0
|
||||
*/
|
||||
@AutoConfiguration(
|
||||
after = { CouchbaseAutoConfiguration.class, CouchbaseReactiveHealthContributorAutoConfiguration.class })
|
||||
@AutoConfiguration(after = CouchbaseReactiveHealthContributorAutoConfiguration.class,
|
||||
afterName = "org.springframework.boot.couchbase.autoconfigure.CouchbaseAutoConfiguration")
|
||||
@ConditionalOnClass(Cluster.class)
|
||||
@ConditionalOnBean(Cluster.class)
|
||||
@ConditionalOnEnabledHealthIndicator("couchbase")
|
||||
|
||||
@@ -29,7 +29,6 @@ import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
|
||||
import org.springframework.boot.autoconfigure.couchbase.CouchbaseAutoConfiguration;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
|
||||
/**
|
||||
@@ -40,7 +39,7 @@ import org.springframework.context.annotation.Bean;
|
||||
* @author Stephane Nicoll
|
||||
* @since 2.1.0
|
||||
*/
|
||||
@AutoConfiguration(after = CouchbaseAutoConfiguration.class)
|
||||
@AutoConfiguration(afterName = "org.springframework.boot.couchbase.autoconfigure.CouchbaseAutoConfiguration")
|
||||
@ConditionalOnClass({ Cluster.class, Flux.class })
|
||||
@ConditionalOnBean(Cluster.class)
|
||||
@ConditionalOnEnabledHealthIndicator("couchbase")
|
||||
|
||||
@@ -43,6 +43,7 @@ dependencies {
|
||||
|
||||
optional(project(":spring-boot-project:spring-boot-activemq"))
|
||||
optional(project(":spring-boot-project:spring-boot-artemis"))
|
||||
optional(project(":spring-boot-project:spring-boot-couchbase"))
|
||||
optional(project(":spring-boot-project:spring-boot-data-jpa"))
|
||||
optional(project(":spring-boot-project:spring-boot-elasticsearch"))
|
||||
optional(project(":spring-boot-project:spring-boot-flyway"))
|
||||
|
||||
@@ -23,7 +23,6 @@ import org.springframework.boot.autoconfigure.AutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnSingleCandidate;
|
||||
import org.springframework.boot.autoconfigure.couchbase.CouchbaseAutoConfiguration;
|
||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
@@ -38,8 +37,8 @@ import org.springframework.data.couchbase.repository.CouchbaseRepository;
|
||||
* @author Stephane Nicoll
|
||||
* @since 1.4.0
|
||||
*/
|
||||
@AutoConfiguration(after = CouchbaseAutoConfiguration.class,
|
||||
afterName = "org.springframework.boot.validation.autoconfigure.ValidationAutoConfiguration")
|
||||
@AutoConfiguration(afterName = { "org.springframework.boot.couchbase.autoconfigure.CouchbaseAutoConfiguration",
|
||||
"org.springframework.boot.validation.autoconfigure.ValidationAutoConfiguration" })
|
||||
@ConditionalOnClass({ Bucket.class, CouchbaseRepository.class })
|
||||
@EnableConfigurationProperties(CouchbaseDataProperties.class)
|
||||
@Import({ CouchbaseDataConfiguration.class, CouchbaseClientFactoryConfiguration.class,
|
||||
|
||||
@@ -63,137 +63,6 @@
|
||||
"level": "error"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "spring.couchbase.bootstrap-hosts",
|
||||
"type": "java.util.List<java.lang.String>",
|
||||
"description": "Couchbase nodes (host or IP address) to bootstrap from.",
|
||||
"deprecation": {
|
||||
"replacement": "spring.couchbase.connection-string",
|
||||
"level": "error"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "spring.couchbase.bucket.name",
|
||||
"type": "java.lang.String",
|
||||
"description": "Name of the bucket to connect to.",
|
||||
"deprecation": {
|
||||
"reason": "A bucket is no longer auto-configured.",
|
||||
"level": "error"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "spring.couchbase.bucket.password",
|
||||
"type": "java.lang.String",
|
||||
"description": "Password of the bucket.",
|
||||
"deprecation": {
|
||||
"reason": "A bucket is no longer auto-configured.",
|
||||
"level": "error"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "spring.couchbase.env.bootstrap.http-direct-port",
|
||||
"type": "java.lang.Integer",
|
||||
"description": "Port for the HTTP bootstrap.",
|
||||
"deprecation": {
|
||||
"level": "error"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "spring.couchbase.env.bootstrap.http-ssl-port",
|
||||
"type": "java.lang.Integer",
|
||||
"description": "Port for the HTTPS bootstrap.",
|
||||
"deprecation": {
|
||||
"level": "error"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "spring.couchbase.env.endpoints.key-value",
|
||||
"type": "java.lang.Integer",
|
||||
"description": "Number of sockets per node against the key/value service.",
|
||||
"deprecation": {
|
||||
"level": "error"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "spring.couchbase.env.endpoints.query",
|
||||
"type": "java.lang.Integer",
|
||||
"description": "Number of sockets per node against the query (N1QL) service.",
|
||||
"deprecation": {
|
||||
"level": "error"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "spring.couchbase.env.endpoints.queryservice.max-endpoints",
|
||||
"type": "java.lang.Integer",
|
||||
"description": "Maximum number of sockets per node.",
|
||||
"deprecation": {
|
||||
"replacement": "spring.couchbase.env.io.max-endpoints",
|
||||
"level": "error"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "spring.couchbase.env.endpoints.queryservice.min-endpoints",
|
||||
"type": "java.lang.Integer",
|
||||
"description": "Minimum number of sockets per node.",
|
||||
"deprecation": {
|
||||
"replacement": "spring.couchbase.env.io.min-endpoints",
|
||||
"level": "error"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "spring.couchbase.env.endpoints.view",
|
||||
"type": "java.lang.Integer",
|
||||
"description": "Number of sockets per node against the view service.",
|
||||
"deprecation": {
|
||||
"level": "error"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "spring.couchbase.env.endpoints.viewservice.max-endpoints",
|
||||
"type": "java.lang.Integer",
|
||||
"description": "Maximum number of sockets per node.",
|
||||
"deprecation": {
|
||||
"replacement": "spring.couchbase.env.io.max-endpoints",
|
||||
"level": "error"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "spring.couchbase.env.endpoints.viewservice.min-endpoints",
|
||||
"type": "java.lang.Integer",
|
||||
"description": "Minimum number of sockets per node.",
|
||||
"deprecation": {
|
||||
"replacement": "spring.couchbase.env.io.min-endpoints",
|
||||
"level": "error"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "spring.couchbase.env.ssl.key-store",
|
||||
"type": "java.lang.String",
|
||||
"description": "Path to the JVM key store that holds the certificates.",
|
||||
"deprecation": {
|
||||
"replacement": "spring.couchbase.env.ssl.bundle",
|
||||
"level": "error",
|
||||
"since": "3.1.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "spring.couchbase.env.ssl.key-store-password",
|
||||
"type": "java.lang.String",
|
||||
"description": "Password used to access the key store.",
|
||||
"deprecation": {
|
||||
"replacement": "spring.couchbase.env.ssl.bundle",
|
||||
"level": "error",
|
||||
"since": "3.1.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "spring.couchbase.env.timeouts.socket-connect",
|
||||
"type": "java.time.Duration",
|
||||
"description": "Socket connect connections timeout.",
|
||||
"deprecation": {
|
||||
"level": "error"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "spring.dao.exceptiontranslation.enabled",
|
||||
"type": "java.lang.Boolean",
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
org.springframework.boot.autoconfigure.aop.AopAutoConfiguration
|
||||
org.springframework.boot.autoconfigure.cache.CacheAutoConfiguration
|
||||
org.springframework.boot.autoconfigure.cassandra.CassandraAutoConfiguration
|
||||
org.springframework.boot.autoconfigure.couchbase.CouchbaseAutoConfiguration
|
||||
org.springframework.boot.autoconfigure.dao.PersistenceExceptionTranslationAutoConfiguration
|
||||
org.springframework.boot.autoconfigure.data.cassandra.CassandraDataAutoConfiguration
|
||||
org.springframework.boot.autoconfigure.data.cassandra.CassandraReactiveDataAutoConfiguration
|
||||
|
||||
@@ -21,10 +21,10 @@ import java.util.Collections;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import org.springframework.boot.autoconfigure.AutoConfigurations;
|
||||
import org.springframework.boot.autoconfigure.couchbase.CouchbaseAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.couchbase.CouchbaseProperties;
|
||||
import org.springframework.boot.autoconfigure.data.couchbase.city.City;
|
||||
import org.springframework.boot.autoconfigure.domain.EntityScan;
|
||||
import org.springframework.boot.couchbase.autoconfigure.CouchbaseAutoConfiguration;
|
||||
import org.springframework.boot.couchbase.autoconfigure.CouchbaseProperties;
|
||||
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
|
||||
import org.springframework.boot.validation.autoconfigure.ValidationAutoConfiguration;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2023 the original author or authors.
|
||||
* Copyright 2012-2025 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -22,9 +22,9 @@ import java.util.List;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import org.springframework.boot.autoconfigure.TestAutoConfigurationPackage;
|
||||
import org.springframework.boot.autoconfigure.couchbase.CouchbaseAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.data.couchbase.city.CityRepository;
|
||||
import org.springframework.boot.autoconfigure.data.couchbase.city.ReactiveCityRepository;
|
||||
import org.springframework.boot.couchbase.autoconfigure.CouchbaseAutoConfiguration;
|
||||
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.Import;
|
||||
|
||||
@@ -21,10 +21,10 @@ import java.util.Collections;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import org.springframework.boot.autoconfigure.AutoConfigurations;
|
||||
import org.springframework.boot.autoconfigure.couchbase.CouchbaseAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.couchbase.CouchbaseProperties;
|
||||
import org.springframework.boot.autoconfigure.data.couchbase.city.City;
|
||||
import org.springframework.boot.autoconfigure.domain.EntityScan;
|
||||
import org.springframework.boot.couchbase.autoconfigure.CouchbaseAutoConfiguration;
|
||||
import org.springframework.boot.couchbase.autoconfigure.CouchbaseProperties;
|
||||
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
|
||||
import org.springframework.boot.validation.autoconfigure.ValidationAutoConfiguration;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2023 the original author or authors.
|
||||
* Copyright 2012-2025 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -20,12 +20,12 @@ import org.junit.jupiter.api.Test;
|
||||
|
||||
import org.springframework.boot.autoconfigure.AutoConfigurations;
|
||||
import org.springframework.boot.autoconfigure.TestAutoConfigurationPackage;
|
||||
import org.springframework.boot.autoconfigure.couchbase.CouchbaseAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.data.alt.couchbase.CityCouchbaseRepository;
|
||||
import org.springframework.boot.autoconfigure.data.alt.couchbase.ReactiveCityCouchbaseRepository;
|
||||
import org.springframework.boot.autoconfigure.data.couchbase.city.City;
|
||||
import org.springframework.boot.autoconfigure.data.couchbase.city.ReactiveCityRepository;
|
||||
import org.springframework.boot.autoconfigure.data.empty.EmptyDataPackage;
|
||||
import org.springframework.boot.couchbase.autoconfigure.CouchbaseAutoConfiguration;
|
||||
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.Import;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2023 the original author or authors.
|
||||
* Copyright 2012-2025 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -20,10 +20,10 @@ import org.junit.jupiter.api.Test;
|
||||
|
||||
import org.springframework.boot.autoconfigure.AutoConfigurations;
|
||||
import org.springframework.boot.autoconfigure.TestAutoConfigurationPackage;
|
||||
import org.springframework.boot.autoconfigure.couchbase.CouchbaseAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.data.couchbase.city.City;
|
||||
import org.springframework.boot.autoconfigure.data.couchbase.city.CityRepository;
|
||||
import org.springframework.boot.autoconfigure.data.empty.EmptyDataPackage;
|
||||
import org.springframework.boot.couchbase.autoconfigure.CouchbaseAutoConfiguration;
|
||||
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.Import;
|
||||
|
||||
29
spring-boot-project/spring-boot-couchbase/build.gradle
Normal file
29
spring-boot-project/spring-boot-couchbase/build.gradle
Normal file
@@ -0,0 +1,29 @@
|
||||
plugins {
|
||||
id "java-library"
|
||||
id "org.springframework.boot.auto-configuration"
|
||||
id "org.springframework.boot.configuration-properties"
|
||||
id "org.springframework.boot.deployed"
|
||||
id "org.springframework.boot.docker-test"
|
||||
id "org.springframework.boot.optional-dependencies"
|
||||
}
|
||||
|
||||
description = "Spring Boot Couchbase"
|
||||
|
||||
dependencies {
|
||||
api(project(":spring-boot-project:spring-boot"))
|
||||
api("com.couchbase.client:java-client")
|
||||
|
||||
optional(project(":spring-boot-project:spring-boot-autoconfigure"))
|
||||
optional(project(":spring-boot-project:spring-boot-jackson"))
|
||||
|
||||
dockerTestImplementation(project(":spring-boot-project:spring-boot-test"))
|
||||
dockerTestImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support-docker"))
|
||||
dockerTestImplementation("org.junit.jupiter:junit-jupiter")
|
||||
dockerTestImplementation("org.testcontainers:couchbase")
|
||||
dockerTestImplementation("org.testcontainers:junit-jupiter")
|
||||
|
||||
testImplementation(project(":spring-boot-project:spring-boot-test"))
|
||||
testImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support"))
|
||||
|
||||
testRuntimeOnly("ch.qos.logback:logback-classic")
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2024 the original author or authors.
|
||||
* Copyright 2012-2025 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.autoconfigure.couchbase;
|
||||
package org.springframework.boot.couchbase.autoconfigure;
|
||||
|
||||
import java.time.Duration;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2023 the original author or authors.
|
||||
* Copyright 2012-2025 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.autoconfigure.couchbase;
|
||||
package org.springframework.boot.couchbase.autoconfigure;
|
||||
|
||||
import com.couchbase.client.java.env.ClusterEnvironment;
|
||||
import com.couchbase.client.java.env.ClusterEnvironment.Builder;
|
||||
@@ -25,7 +25,7 @@ import com.couchbase.client.java.env.ClusterEnvironment.Builder;
|
||||
* retaining default auto-configuration.
|
||||
*
|
||||
* @author Stephane Nicoll
|
||||
* @since 2.3.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
@FunctionalInterface
|
||||
public interface ClusterEnvironmentBuilderCustomizer {
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.autoconfigure.couchbase;
|
||||
package org.springframework.boot.couchbase.autoconfigure;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
@@ -43,12 +43,12 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnSingleCandidate;
|
||||
import org.springframework.boot.autoconfigure.couchbase.CouchbaseAutoConfiguration.CouchbaseCondition;
|
||||
import org.springframework.boot.autoconfigure.couchbase.CouchbaseProperties.Authentication.Jks;
|
||||
import org.springframework.boot.autoconfigure.couchbase.CouchbaseProperties.Authentication.Pem;
|
||||
import org.springframework.boot.autoconfigure.couchbase.CouchbaseProperties.Ssl;
|
||||
import org.springframework.boot.autoconfigure.couchbase.CouchbaseProperties.Timeouts;
|
||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||
import org.springframework.boot.couchbase.autoconfigure.CouchbaseAutoConfiguration.CouchbaseCondition;
|
||||
import org.springframework.boot.couchbase.autoconfigure.CouchbaseProperties.Authentication.Jks;
|
||||
import org.springframework.boot.couchbase.autoconfigure.CouchbaseProperties.Authentication.Pem;
|
||||
import org.springframework.boot.couchbase.autoconfigure.CouchbaseProperties.Ssl;
|
||||
import org.springframework.boot.couchbase.autoconfigure.CouchbaseProperties.Timeouts;
|
||||
import org.springframework.boot.io.ApplicationResourceLoader;
|
||||
import org.springframework.boot.ssl.SslBundle;
|
||||
import org.springframework.boot.ssl.SslBundles;
|
||||
@@ -73,7 +73,7 @@ import org.springframework.util.StringUtils;
|
||||
* @author Andy Wilkinson
|
||||
* @author Phillip Webb
|
||||
* @author Scott Frederick
|
||||
* @since 1.4.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
@AutoConfiguration(afterName = "org.springframework.boot.jackson.autoconfigure.JacksonAutoConfiguration")
|
||||
@ConditionalOnClass(Cluster.class)
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.autoconfigure.couchbase;
|
||||
package org.springframework.boot.couchbase.autoconfigure;
|
||||
|
||||
import org.springframework.boot.autoconfigure.service.connection.ConnectionDetails;
|
||||
import org.springframework.boot.ssl.SslBundle;
|
||||
@@ -25,7 +25,7 @@ import org.springframework.boot.ssl.SslBundle;
|
||||
* @author Moritz Halbritter
|
||||
* @author Andy Wilkinson
|
||||
* @author Phillip Webb
|
||||
* @since 3.1.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
public interface CouchbaseConnectionDetails extends ConnectionDetails {
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.autoconfigure.couchbase;
|
||||
package org.springframework.boot.couchbase.autoconfigure;
|
||||
|
||||
import java.time.Duration;
|
||||
|
||||
@@ -30,7 +30,7 @@ import org.springframework.util.StringUtils;
|
||||
* @author Brian Clozel
|
||||
* @author Michael Nitschinger
|
||||
* @author Scott Frederick
|
||||
* @since 1.4.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
@ConfigurationProperties("spring.couchbase")
|
||||
public class CouchbaseProperties {
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2019 the original author or authors.
|
||||
* Copyright 2012-2025 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -17,4 +17,4 @@
|
||||
/**
|
||||
* Auto-configuration for Couchbase.
|
||||
*/
|
||||
package org.springframework.boot.autoconfigure.couchbase;
|
||||
package org.springframework.boot.couchbase.autoconfigure;
|
||||
@@ -0,0 +1,136 @@
|
||||
{
|
||||
"groups": [],
|
||||
"properties": [
|
||||
{
|
||||
"name": "spring.couchbase.bootstrap-hosts",
|
||||
"type": "java.util.List<java.lang.String>",
|
||||
"description": "Couchbase nodes (host or IP address) to bootstrap from.",
|
||||
"deprecation": {
|
||||
"replacement": "spring.couchbase.connection-string",
|
||||
"level": "error"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "spring.couchbase.bucket.name",
|
||||
"type": "java.lang.String",
|
||||
"description": "Name of the bucket to connect to.",
|
||||
"deprecation": {
|
||||
"reason": "A bucket is no longer auto-configured.",
|
||||
"level": "error"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "spring.couchbase.bucket.password",
|
||||
"type": "java.lang.String",
|
||||
"description": "Password of the bucket.",
|
||||
"deprecation": {
|
||||
"reason": "A bucket is no longer auto-configured.",
|
||||
"level": "error"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "spring.couchbase.env.bootstrap.http-direct-port",
|
||||
"type": "java.lang.Integer",
|
||||
"description": "Port for the HTTP bootstrap.",
|
||||
"deprecation": {
|
||||
"level": "error"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "spring.couchbase.env.bootstrap.http-ssl-port",
|
||||
"type": "java.lang.Integer",
|
||||
"description": "Port for the HTTPS bootstrap.",
|
||||
"deprecation": {
|
||||
"level": "error"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "spring.couchbase.env.endpoints.key-value",
|
||||
"type": "java.lang.Integer",
|
||||
"description": "Number of sockets per node against the key/value service.",
|
||||
"deprecation": {
|
||||
"level": "error"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "spring.couchbase.env.endpoints.query",
|
||||
"type": "java.lang.Integer",
|
||||
"description": "Number of sockets per node against the query (N1QL) service.",
|
||||
"deprecation": {
|
||||
"level": "error"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "spring.couchbase.env.endpoints.queryservice.max-endpoints",
|
||||
"type": "java.lang.Integer",
|
||||
"description": "Maximum number of sockets per node.",
|
||||
"deprecation": {
|
||||
"replacement": "spring.couchbase.env.io.max-endpoints",
|
||||
"level": "error"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "spring.couchbase.env.endpoints.queryservice.min-endpoints",
|
||||
"type": "java.lang.Integer",
|
||||
"description": "Minimum number of sockets per node.",
|
||||
"deprecation": {
|
||||
"replacement": "spring.couchbase.env.io.min-endpoints",
|
||||
"level": "error"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "spring.couchbase.env.endpoints.view",
|
||||
"type": "java.lang.Integer",
|
||||
"description": "Number of sockets per node against the view service.",
|
||||
"deprecation": {
|
||||
"level": "error"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "spring.couchbase.env.endpoints.viewservice.max-endpoints",
|
||||
"type": "java.lang.Integer",
|
||||
"description": "Maximum number of sockets per node.",
|
||||
"deprecation": {
|
||||
"replacement": "spring.couchbase.env.io.max-endpoints",
|
||||
"level": "error"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "spring.couchbase.env.endpoints.viewservice.min-endpoints",
|
||||
"type": "java.lang.Integer",
|
||||
"description": "Minimum number of sockets per node.",
|
||||
"deprecation": {
|
||||
"replacement": "spring.couchbase.env.io.min-endpoints",
|
||||
"level": "error"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "spring.couchbase.env.ssl.key-store",
|
||||
"type": "java.lang.String",
|
||||
"description": "Path to the JVM key store that holds the certificates.",
|
||||
"deprecation": {
|
||||
"replacement": "spring.couchbase.env.ssl.bundle",
|
||||
"level": "error",
|
||||
"since": "3.1.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "spring.couchbase.env.ssl.key-store-password",
|
||||
"type": "java.lang.String",
|
||||
"description": "Password used to access the key store.",
|
||||
"deprecation": {
|
||||
"replacement": "spring.couchbase.env.ssl.bundle",
|
||||
"level": "error",
|
||||
"since": "3.1.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "spring.couchbase.env.timeouts.socket-connect",
|
||||
"type": "java.time.Duration",
|
||||
"description": "Socket connect connections timeout.",
|
||||
"deprecation": {
|
||||
"level": "error"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
org.springframework.boot.couchbase.autoconfigure.CouchbaseAutoConfiguration
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.autoconfigure.couchbase;
|
||||
package org.springframework.boot.couchbase.autoconfigure;
|
||||
|
||||
import java.time.Duration;
|
||||
import java.util.HashSet;
|
||||
@@ -37,8 +37,8 @@ import org.assertj.core.api.InstanceOfAssertFactories;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import org.springframework.boot.autoconfigure.AutoConfigurations;
|
||||
import org.springframework.boot.autoconfigure.couchbase.CouchbaseAutoConfiguration.PropertiesCouchbaseConnectionDetails;
|
||||
import org.springframework.boot.autoconfigure.ssl.SslAutoConfiguration;
|
||||
import org.springframework.boot.couchbase.autoconfigure.CouchbaseAutoConfiguration.PropertiesCouchbaseConnectionDetails;
|
||||
import org.springframework.boot.jackson.autoconfigure.JacksonAutoConfiguration;
|
||||
import org.springframework.boot.ssl.NoSuchSslBundleException;
|
||||
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2023 the original author or authors.
|
||||
* Copyright 2012-2025 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -14,14 +14,14 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.autoconfigure.couchbase;
|
||||
package org.springframework.boot.couchbase.autoconfigure;
|
||||
|
||||
import com.couchbase.client.core.env.IoConfig;
|
||||
import com.couchbase.client.core.env.TimeoutConfig;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import org.springframework.boot.autoconfigure.couchbase.CouchbaseProperties.Io;
|
||||
import org.springframework.boot.autoconfigure.couchbase.CouchbaseProperties.Timeouts;
|
||||
import org.springframework.boot.couchbase.autoconfigure.CouchbaseProperties.Io;
|
||||
import org.springframework.boot.couchbase.autoconfigure.CouchbaseProperties.Timeouts;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2024 the original author or authors.
|
||||
* Copyright 2012-2025 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.autoconfigure.couchbase;
|
||||
package org.springframework.boot.couchbase.autoconfigure;
|
||||
|
||||
import com.couchbase.client.core.env.Authenticator;
|
||||
import com.couchbase.client.java.Cluster;
|
||||
@@ -1985,6 +1985,7 @@ bom {
|
||||
"spring-boot-buildpack-platform",
|
||||
"spring-boot-configuration-metadata",
|
||||
"spring-boot-configuration-processor",
|
||||
"spring-boot-couchbase",
|
||||
"spring-boot-data-jpa",
|
||||
"spring-boot-devtools",
|
||||
"spring-boot-docker-compose",
|
||||
|
||||
@@ -66,6 +66,7 @@ dependencies {
|
||||
autoConfiguration(project(path: ":spring-boot-project:spring-boot-autoconfigure", configuration: "autoConfigurationMetadata"))
|
||||
autoConfiguration(project(path: ":spring-boot-project:spring-boot-autoconfigure-all", configuration: "autoConfigurationMetadata"))
|
||||
autoConfiguration(project(path: ":spring-boot-project:spring-boot-batch", configuration: "autoConfigurationMetadata"))
|
||||
autoConfiguration(project(path: ":spring-boot-project:spring-boot-couchbase", configuration: "autoConfigurationMetadata"))
|
||||
autoConfiguration(project(path: ":spring-boot-project:spring-boot-data-jpa", configuration: "autoConfigurationMetadata"))
|
||||
autoConfiguration(project(path: ":spring-boot-project:spring-boot-devtools", configuration: "autoConfigurationMetadata"))
|
||||
autoConfiguration(project(path: ":spring-boot-project:spring-boot-elasticsearch", configuration: "autoConfigurationMetadata"))
|
||||
@@ -102,6 +103,7 @@ dependencies {
|
||||
configurationProperties(project(path: ":spring-boot-project:spring-boot-autoconfigure", configuration: "configurationPropertiesMetadata"))
|
||||
configurationProperties(project(path: ":spring-boot-project:spring-boot-autoconfigure-all", configuration: "configurationPropertiesMetadata"))
|
||||
configurationProperties(project(path: ":spring-boot-project:spring-boot-batch", configuration: "configurationPropertiesMetadata"))
|
||||
configurationProperties(project(path: ":spring-boot-project:spring-boot-couchbase", configuration: "configurationPropertiesMetadata"))
|
||||
configurationProperties(project(path: ":spring-boot-project:spring-boot-data-jpa", configuration: "configurationPropertiesMetadata"))
|
||||
configurationProperties(project(path: ":spring-boot-project:spring-boot-devtools", configuration: "configurationPropertiesMetadata"))
|
||||
configurationProperties(project(path: ":spring-boot-project:spring-boot-docker-compose", configuration: "configurationPropertiesMetadata"))
|
||||
|
||||
@@ -602,7 +602,7 @@ spring:
|
||||
----
|
||||
|
||||
TIP: Check the `spring.couchbase.env.*` properties for more details.
|
||||
To take more control, one or more javadoc:org.springframework.boot.autoconfigure.couchbase.ClusterEnvironmentBuilderCustomizer[] beans can be used.
|
||||
To take more control, one or more javadoc:org.springframework.boot.couchbase.autoconfigure.ClusterEnvironmentBuilderCustomizer[] beans can be used.
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -128,7 +128,7 @@ The following service connection factories are provided in the `spring-boot-test
|
||||
| javadoc:org.springframework.boot.autoconfigure.cassandra.CassandraConnectionDetails[]
|
||||
| Containers of type javadoc:org.testcontainers.cassandra.CassandraContainer[]
|
||||
|
||||
| javadoc:org.springframework.boot.autoconfigure.couchbase.CouchbaseConnectionDetails[]
|
||||
| javadoc:org.springframework.boot.couchbase.autoconfigure.CouchbaseConnectionDetails[]
|
||||
| Containers of type javadoc:org.testcontainers.couchbase.CouchbaseContainer[]
|
||||
|
||||
| javadoc:org.springframework.boot.elasticsearch.autoconfigure.ElasticsearchConnectionDetails[]
|
||||
|
||||
@@ -6,6 +6,7 @@ description = "Starter for using Couchbase document-oriented database and Spring
|
||||
|
||||
dependencies {
|
||||
api(project(":spring-boot-project:spring-boot-starters:spring-boot-starter"))
|
||||
api(project(":spring-boot-project:spring-boot-couchbase"))
|
||||
api(project(":spring-boot-project:spring-boot-tx"))
|
||||
api("io.projectreactor:reactor-core")
|
||||
api("org.springframework.data:spring-data-couchbase")
|
||||
|
||||
@@ -6,6 +6,7 @@ description = "Starter for using Couchbase document-oriented database and Spring
|
||||
|
||||
dependencies {
|
||||
api(project(":spring-boot-project:spring-boot-starters:spring-boot-starter"))
|
||||
api(project(":spring-boot-project:spring-boot-couchbase"))
|
||||
api(project(":spring-boot-project:spring-boot-tx"))
|
||||
api("org.springframework.data:spring-data-couchbase")
|
||||
}
|
||||
|
||||
@@ -36,6 +36,7 @@ dependencies {
|
||||
dockerTestRuntimeOnly("io.lettuce:lettuce-core")
|
||||
dockerTestRuntimeOnly("org.springframework.data:spring-data-redis")
|
||||
|
||||
optional(project(":spring-boot-project:spring-boot-couchbase"))
|
||||
optional(project(":spring-boot-project:spring-boot-data-jpa"))
|
||||
optional(project(":spring-boot-project:spring-boot-elasticsearch"))
|
||||
optional(project(":spring-boot-project:spring-boot-flyway"))
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# AutoConfigureDataCouchbase auto-configuration imports
|
||||
|
||||
org.springframework.boot.autoconfigure.couchbase.CouchbaseAutoConfiguration
|
||||
org.springframework.boot.couchbase.autoconfigure.CouchbaseAutoConfiguration
|
||||
org.springframework.boot.autoconfigure.data.couchbase.CouchbaseDataAutoConfiguration
|
||||
org.springframework.boot.autoconfigure.data.couchbase.CouchbaseReactiveDataAutoConfiguration
|
||||
org.springframework.boot.autoconfigure.data.couchbase.CouchbaseReactiveRepositoriesAutoConfiguration
|
||||
|
||||
@@ -13,6 +13,7 @@ dependencies {
|
||||
api(project(":spring-boot-project:spring-boot-autoconfigure-all"))
|
||||
api("org.testcontainers:testcontainers")
|
||||
|
||||
dockerTestImplementation(project(":spring-boot-project:spring-boot-couchbase"))
|
||||
dockerTestImplementation(project(":spring-boot-project:spring-boot-flyway"))
|
||||
dockerTestImplementation(project(":spring-boot-project:spring-boot-jdbc"))
|
||||
dockerTestImplementation(project(":spring-boot-project:spring-boot-kafka"))
|
||||
@@ -58,6 +59,7 @@ dependencies {
|
||||
optional(project(":spring-boot-project:spring-boot-amqp"))
|
||||
optional(project(":spring-boot-project:spring-boot-artemis"))
|
||||
optional(project(":spring-boot-project:spring-boot-actuator-autoconfigure"))
|
||||
optional(project(":spring-boot-project:spring-boot-couchbase"))
|
||||
optional(project(":spring-boot-project:spring-boot-elasticsearch"))
|
||||
optional(project(":spring-boot-project:spring-boot-flyway"))
|
||||
optional(project(":spring-boot-project:spring-boot-hazelcast"))
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2024 the original author or authors.
|
||||
* Copyright 2012-2025 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -26,8 +26,8 @@ import org.testcontainers.junit.jupiter.Testcontainers;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.autoconfigure.ImportAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.couchbase.CouchbaseAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.couchbase.CouchbaseConnectionDetails;
|
||||
import org.springframework.boot.couchbase.autoconfigure.CouchbaseAutoConfiguration;
|
||||
import org.springframework.boot.couchbase.autoconfigure.CouchbaseConnectionDetails;
|
||||
import org.springframework.boot.testcontainers.service.connection.ServiceConnection;
|
||||
import org.springframework.boot.testsupport.container.TestImage;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
@@ -18,7 +18,7 @@ package org.springframework.boot.testcontainers.service.connection.couchbase;
|
||||
|
||||
import org.testcontainers.couchbase.CouchbaseContainer;
|
||||
|
||||
import org.springframework.boot.autoconfigure.couchbase.CouchbaseConnectionDetails;
|
||||
import org.springframework.boot.couchbase.autoconfigure.CouchbaseConnectionDetails;
|
||||
import org.springframework.boot.ssl.SslBundle;
|
||||
import org.springframework.boot.testcontainers.service.connection.ContainerConnectionDetailsFactory;
|
||||
import org.springframework.boot.testcontainers.service.connection.ContainerConnectionSource;
|
||||
|
||||
Reference in New Issue
Block a user