Browse Source

Create spring-boot-cassandra module

See gh-46104
pull/46230/head
Andy Wilkinson 10 months ago
parent
commit
f50fdffc68
  1. 1
      settings.gradle
  2. 1
      spring-boot-project/spring-boot-actuator-autoconfigure/build.gradle
  3. 5
      spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/cassandra/CassandraHealthContributorAutoConfiguration.java
  4. 2
      spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/cassandra/CassandraReactiveHealthContributorAutoConfiguration.java
  5. 2
      spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/WebEndpointsAutoConfigurationIntegrationTests.java
  6. 1
      spring-boot-project/spring-boot-autoconfigure-all/build.gradle
  7. 2
      spring-boot-project/spring-boot-autoconfigure-all/src/dockerTest/java/org/springframework/boot/autoconfigure/data/cassandra/CassandraDataAutoConfigurationIntegrationTests.java
  8. 3
      spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/data/cassandra/CassandraDataAutoConfiguration.java
  9. 61
      spring-boot-project/spring-boot-autoconfigure-all/src/main/resources/META-INF/additional-spring-configuration-metadata.json
  10. 1
      spring-boot-project/spring-boot-autoconfigure-all/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
  11. 2
      spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/cassandra/CassandraDataAutoConfigurationTests.java
  12. 2
      spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/cassandra/CassandraReactiveDataAutoConfigurationTests.java
  13. 2
      spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/cassandra/CassandraReactiveRepositoriesAutoConfigurationTests.java
  14. 2
      spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/cassandra/CassandraRepositoriesAutoConfigurationTests.java
  15. 45
      spring-boot-project/spring-boot-cassandra/build.gradle
  16. 2
      spring-boot-project/spring-boot-cassandra/src/dockerTest/java/org/springframework/boot/cassandra/autoconfigure/CassandraAutoConfigurationIntegrationTests.java
  17. 2
      spring-boot-project/spring-boot-cassandra/src/dockerTest/java/org/springframework/boot/cassandra/autoconfigure/CassandraAutoConfigurationWithPasswordAuthenticationIntegrationTests.java
  18. 16
      spring-boot-project/spring-boot-cassandra/src/main/java/org/springframework/boot/cassandra/autoconfigure/CassandraAutoConfiguration.java
  19. 4
      spring-boot-project/spring-boot-cassandra/src/main/java/org/springframework/boot/cassandra/autoconfigure/CassandraConnectionDetails.java
  20. 4
      spring-boot-project/spring-boot-cassandra/src/main/java/org/springframework/boot/cassandra/autoconfigure/CassandraProperties.java
  21. 4
      spring-boot-project/spring-boot-cassandra/src/main/java/org/springframework/boot/cassandra/autoconfigure/CqlSessionBuilderCustomizer.java
  22. 4
      spring-boot-project/spring-boot-cassandra/src/main/java/org/springframework/boot/cassandra/autoconfigure/DriverConfigLoaderBuilderCustomizer.java
  23. 2
      spring-boot-project/spring-boot-cassandra/src/main/java/org/springframework/boot/cassandra/autoconfigure/package-info.java
  24. 68
      spring-boot-project/spring-boot-cassandra/src/main/resources/META-INF/additional-spring-configuration-metadata.json
  25. 1
      spring-boot-project/spring-boot-cassandra/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
  26. 10
      spring-boot-project/spring-boot-cassandra/src/test/java/org/springframework/boot/cassandra/autoconfigure/CassandraAutoConfigurationTests.java
  27. 2
      spring-boot-project/spring-boot-cassandra/src/test/java/org/springframework/boot/cassandra/autoconfigure/CassandraPropertiesTests.java
  28. 0
      spring-boot-project/spring-boot-cassandra/src/test/resources/org/springframework/boot/cassandra/autoconfigure/override-defaults.conf
  29. 0
      spring-boot-project/spring-boot-cassandra/src/test/resources/org/springframework/boot/cassandra/autoconfigure/profiles.conf
  30. 0
      spring-boot-project/spring-boot-cassandra/src/test/resources/org/springframework/boot/cassandra/autoconfigure/simple.conf
  31. 0
      spring-boot-project/spring-boot-cassandra/src/test/resources/org/springframework/boot/cassandra/autoconfigure/test.jks
  32. 1
      spring-boot-project/spring-boot-dependencies/build.gradle
  33. 1
      spring-boot-project/spring-boot-docker-compose/build.gradle
  34. 4
      spring-boot-project/spring-boot-docker-compose/src/dockerTest/java/org/springframework/boot/docker/compose/service/connection/cassandra/CassandraDockerComposeConnectionDetailsFactoryIntegrationTests.java
  35. 2
      spring-boot-project/spring-boot-docker-compose/src/main/java/org/springframework/boot/docker/compose/service/connection/cassandra/CassandraDockerComposeConnectionDetailsFactory.java
  36. 2
      spring-boot-project/spring-boot-docs/build.gradle
  37. 4
      spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/data/nosql.adoc
  38. 2
      spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/features/dev-services.adoc
  39. 2
      spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/testing/testcontainers.adoc
  40. 1
      spring-boot-project/spring-boot-starters/spring-boot-starter-data-cassandra-reactive/build.gradle
  41. 1
      spring-boot-project/spring-boot-starters/spring-boot-starter-data-cassandra/build.gradle
  42. 1
      spring-boot-project/spring-boot-test-autoconfigure/build.gradle
  43. 2
      spring-boot-project/spring-boot-test-autoconfigure/src/main/resources/META-INF/spring/org.springframework.boot.test.autoconfigure.data.cassandra.AutoConfigureDataCassandra.imports
  44. 2
      spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/actuate/observability/AutoConfigureObservabilitySpringBootApplication.java
  45. 2
      spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/json/app/ExampleJsonApplication.java
  46. 2
      spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/override/OverrideAutoConfigurationSpringBootApplication.java
  47. 2
      spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/restdocs/RestDocsTestApplication.java
  48. 2
      spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/web/client/AutoConfigureMockRestServiceServerWithRestClientIntegrationTests.java
  49. 2
      spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/web/client/AutoConfigureMockRestServiceServerWithRestTemplateRootUriIntegrationTests.java
  50. 2
      spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/web/client/AutoConfigureWebClientWithRestTemplateIntegrationTests.java
  51. 2
      spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/web/reactive/webclient/ExampleWebFluxApplication.java
  52. 2
      spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/web/servlet/mockmvc/ExampleWebMvcApplication.java
  53. 2
      spring-boot-project/spring-boot-testcontainers/build.gradle
  54. 4
      spring-boot-project/spring-boot-testcontainers/src/dockerTest/java/org/springframework/boot/testcontainers/service/connection/cassandra/CassandraContainerConnectionDetailsFactoryTests.java
  55. 4
      spring-boot-project/spring-boot-testcontainers/src/dockerTest/java/org/springframework/boot/testcontainers/service/connection/cassandra/DeprecatedCassandraContainerConnectionDetailsFactoryTests.java
  56. 2
      spring-boot-project/spring-boot-testcontainers/src/main/java/org/springframework/boot/testcontainers/service/connection/cassandra/CassandraContainerConnectionDetailsFactory.java
  57. 2
      spring-boot-project/spring-boot-testcontainers/src/main/java/org/springframework/boot/testcontainers/service/connection/cassandra/DeprecatedCassandraContainerConnectionDetailsFactory.java

1
settings.gradle

@ -66,6 +66,7 @@ include "spring-boot-project:spring-boot-artemis" @@ -66,6 +66,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-cassandra"
include "spring-boot-project:spring-boot-couchbase"
include "spring-boot-project:spring-boot-data-jpa"
include "spring-boot-project:spring-boot-dependencies"

1
spring-boot-project/spring-boot-actuator-autoconfigure/build.gradle

@ -36,6 +36,7 @@ dependencies { @@ -36,6 +36,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-cassandra"))
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"))

5
spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/cassandra/CassandraHealthContributorAutoConfiguration.java

@ -23,7 +23,6 @@ import org.springframework.boot.actuate.autoconfigure.health.ConditionalOnEnable @@ -23,7 +23,6 @@ import org.springframework.boot.actuate.autoconfigure.health.ConditionalOnEnable
import org.springframework.boot.actuate.cassandra.CassandraDriverHealthIndicator;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.cassandra.CassandraAutoConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.context.annotation.Import;
@ -35,8 +34,8 @@ import org.springframework.context.annotation.Import; @@ -35,8 +34,8 @@ import org.springframework.context.annotation.Import;
* @author Stephane Nicoll
* @since 2.1.0
*/
@AutoConfiguration(
after = { CassandraAutoConfiguration.class, CassandraReactiveHealthContributorAutoConfiguration.class })
@AutoConfiguration(after = CassandraReactiveHealthContributorAutoConfiguration.class,
afterName = "org.springframework.boot.cassandra.autoconfigure.CassandraAutoConfiguration")
@ConditionalOnClass(CqlSession.class)
@ConditionalOnEnabledHealthIndicator("cassandra")
@Import(CassandraDriverConfiguration.class)

2
spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/cassandra/CassandraReactiveHealthContributorAutoConfiguration.java

@ -24,8 +24,8 @@ import org.springframework.boot.actuate.autoconfigure.health.ConditionalOnEnable @@ -24,8 +24,8 @@ import org.springframework.boot.actuate.autoconfigure.health.ConditionalOnEnable
import org.springframework.boot.actuate.cassandra.CassandraDriverReactiveHealthIndicator;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.cassandra.CassandraAutoConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.cassandra.autoconfigure.CassandraAutoConfiguration;
import org.springframework.context.annotation.Import;
/**

2
spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/WebEndpointsAutoConfigurationIntegrationTests.java

@ -24,7 +24,6 @@ import org.springframework.boot.actuate.autoconfigure.tracing.OpenTelemetryTraci @@ -24,7 +24,6 @@ import org.springframework.boot.actuate.autoconfigure.tracing.OpenTelemetryTraci
import org.springframework.boot.actuate.health.HealthEndpointWebExtension;
import org.springframework.boot.actuate.health.ReactiveHealthEndpointWebExtension;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.cassandra.CassandraAutoConfiguration;
import org.springframework.boot.autoconfigure.data.cassandra.CassandraDataAutoConfiguration;
import org.springframework.boot.autoconfigure.data.elasticsearch.ElasticsearchDataAutoConfiguration;
import org.springframework.boot.autoconfigure.data.mongo.MongoDataAutoConfiguration;
@ -36,6 +35,7 @@ import org.springframework.boot.autoconfigure.data.redis.RedisRepositoriesAutoCo @@ -36,6 +35,7 @@ import org.springframework.boot.autoconfigure.data.redis.RedisRepositoriesAutoCo
import org.springframework.boot.autoconfigure.data.rest.RepositoryRestMvcAutoConfiguration;
import org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration;
import org.springframework.boot.autoconfigure.mongo.MongoReactiveAutoConfiguration;
import org.springframework.boot.cassandra.autoconfigure.CassandraAutoConfiguration;
import org.springframework.boot.context.annotation.UserConfigurations;
import org.springframework.boot.flyway.autoconfigure.FlywayAutoConfiguration;
import org.springframework.boot.hazelcast.autoconfigure.HazelcastAutoConfiguration;

1
spring-boot-project/spring-boot-autoconfigure-all/build.gradle

@ -60,6 +60,7 @@ dependencies { @@ -60,6 +60,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-cassandra"))
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"))

2
spring-boot-project/spring-boot-autoconfigure-all/src/dockerTest/java/org/springframework/boot/autoconfigure/data/cassandra/CassandraDataAutoConfigurationIntegrationTests.java

@ -26,8 +26,8 @@ import org.testcontainers.junit.jupiter.Testcontainers; @@ -26,8 +26,8 @@ import org.testcontainers.junit.jupiter.Testcontainers;
import org.springframework.beans.factory.support.BeanDefinitionRegistry;
import org.springframework.boot.autoconfigure.AutoConfigurationPackages;
import org.springframework.boot.autoconfigure.AutoConfigurations;
import org.springframework.boot.autoconfigure.cassandra.CassandraAutoConfiguration;
import org.springframework.boot.autoconfigure.data.cassandra.city.City;
import org.springframework.boot.cassandra.autoconfigure.CassandraAutoConfiguration;
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
import org.springframework.boot.testsupport.container.TestImage;
import org.springframework.context.annotation.Bean;

3
spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/data/cassandra/CassandraDataAutoConfiguration.java

@ -25,7 +25,6 @@ import org.springframework.beans.factory.BeanFactory; @@ -25,7 +25,6 @@ import org.springframework.beans.factory.BeanFactory;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.autoconfigure.AutoConfigurationPackages;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.cassandra.CassandraAutoConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
@ -60,7 +59,7 @@ import org.springframework.data.cassandra.core.mapping.SimpleUserTypeResolver; @@ -60,7 +59,7 @@ import org.springframework.data.cassandra.core.mapping.SimpleUserTypeResolver;
* @author Christoph Strobl
* @since 1.3.0
*/
@AutoConfiguration(after = CassandraAutoConfiguration.class)
@AutoConfiguration(afterName = "org.springframework.boot.cassandra.autoconfigure.CassandraAutoConfiguration")
@ConditionalOnClass({ CqlSession.class, CassandraAdminOperations.class })
@ConditionalOnBean(CqlSession.class)
public class CassandraDataAutoConfiguration {

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

@ -13,56 +13,6 @@ @@ -13,56 +13,6 @@
"description": "Whether subclass-based (CGLIB) proxies are to be created (true), as opposed to standard Java interface-based proxies (false).",
"defaultValue": true
},
{
"name": "spring.cassandra.compression",
"defaultValue": "none"
},
{
"name": "spring.cassandra.connection.connect-timeout",
"defaultValue": "5s"
},
{
"name": "spring.cassandra.connection.init-query-timeout",
"defaultValue": "5s"
},
{
"name": "spring.cassandra.contact-points",
"defaultValue": [
"127.0.0.1:9042"
]
},
{
"name": "spring.cassandra.controlconnection.timeout",
"defaultValue": "5s"
},
{
"name": "spring.cassandra.pool.heartbeat-interval",
"defaultValue": "30s"
},
{
"name": "spring.cassandra.pool.idle-timeout",
"defaultValue": "5s"
},
{
"name": "spring.cassandra.request.page-size",
"defaultValue": 5000
},
{
"name": "spring.cassandra.request.throttler.type",
"defaultValue": "none"
},
{
"name": "spring.cassandra.request.timeout",
"defaultValue": "2s"
},
{
"name": "spring.cassandra.ssl",
"type": "java.lang.Boolean",
"deprecation": {
"replacement": "spring.cassandra.ssl.enabled",
"level": "error"
}
},
{
"name": "spring.dao.exceptiontranslation.enabled",
"type": "java.lang.Boolean",
@ -1405,17 +1355,6 @@ @@ -1405,17 +1355,6 @@
}
]
},
{
"name": "spring.cassandra.schema-action",
"providers": [
{
"name": "handle-as",
"parameters": {
"target": "org.springframework.data.cassandra.config.SchemaAction"
}
}
]
},
{
"name": "spring.data.mongodb.field-naming-strategy",
"providers": [

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

@ -1,6 +1,5 @@ @@ -1,6 +1,5 @@
org.springframework.boot.autoconfigure.aop.AopAutoConfiguration
org.springframework.boot.autoconfigure.cache.CacheAutoConfiguration
org.springframework.boot.autoconfigure.cassandra.CassandraAutoConfiguration
org.springframework.boot.autoconfigure.dao.PersistenceExceptionTranslationAutoConfiguration
org.springframework.boot.autoconfigure.data.cassandra.CassandraDataAutoConfiguration
org.springframework.boot.autoconfigure.data.cassandra.CassandraReactiveDataAutoConfiguration

2
spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/cassandra/CassandraDataAutoConfigurationTests.java

@ -22,9 +22,9 @@ import com.datastax.oss.driver.api.core.CqlSession; @@ -22,9 +22,9 @@ import com.datastax.oss.driver.api.core.CqlSession;
import org.junit.jupiter.api.Test;
import org.springframework.boot.autoconfigure.AutoConfigurations;
import org.springframework.boot.autoconfigure.cassandra.CassandraAutoConfiguration;
import org.springframework.boot.autoconfigure.data.cassandra.city.City;
import org.springframework.boot.autoconfigure.domain.EntityScan;
import org.springframework.boot.cassandra.autoconfigure.CassandraAutoConfiguration;
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.Bean;

2
spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/cassandra/CassandraReactiveDataAutoConfigurationTests.java

@ -19,9 +19,9 @@ package org.springframework.boot.autoconfigure.data.cassandra; @@ -19,9 +19,9 @@ package org.springframework.boot.autoconfigure.data.cassandra;
import org.junit.jupiter.api.Test;
import org.springframework.boot.autoconfigure.AutoConfigurations;
import org.springframework.boot.autoconfigure.cassandra.CassandraAutoConfiguration;
import org.springframework.boot.autoconfigure.data.cassandra.city.City;
import org.springframework.boot.autoconfigure.domain.EntityScan;
import org.springframework.boot.cassandra.autoconfigure.CassandraAutoConfiguration;
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.cassandra.core.ReactiveCassandraTemplate;

2
spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/cassandra/CassandraReactiveRepositoriesAutoConfigurationTests.java

@ -21,12 +21,12 @@ import org.junit.jupiter.api.Test; @@ -21,12 +21,12 @@ import org.junit.jupiter.api.Test;
import org.springframework.boot.autoconfigure.AutoConfigurations;
import org.springframework.boot.autoconfigure.TestAutoConfigurationPackage;
import org.springframework.boot.autoconfigure.cassandra.CassandraAutoConfiguration;
import org.springframework.boot.autoconfigure.context.PropertyPlaceholderAutoConfiguration;
import org.springframework.boot.autoconfigure.data.alt.cassandra.ReactiveCityCassandraRepository;
import org.springframework.boot.autoconfigure.data.cassandra.city.City;
import org.springframework.boot.autoconfigure.data.cassandra.city.ReactiveCityRepository;
import org.springframework.boot.autoconfigure.data.empty.EmptyDataPackage;
import org.springframework.boot.cassandra.autoconfigure.CassandraAutoConfiguration;
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Configuration;

2
spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/cassandra/CassandraRepositoriesAutoConfigurationTests.java

@ -21,12 +21,12 @@ import org.junit.jupiter.api.Test; @@ -21,12 +21,12 @@ import org.junit.jupiter.api.Test;
import org.springframework.boot.autoconfigure.AutoConfigurations;
import org.springframework.boot.autoconfigure.TestAutoConfigurationPackage;
import org.springframework.boot.autoconfigure.cassandra.CassandraAutoConfiguration;
import org.springframework.boot.autoconfigure.context.PropertyPlaceholderAutoConfiguration;
import org.springframework.boot.autoconfigure.data.alt.cassandra.CityCassandraRepository;
import org.springframework.boot.autoconfigure.data.cassandra.city.City;
import org.springframework.boot.autoconfigure.data.cassandra.city.CityRepository;
import org.springframework.boot.autoconfigure.data.empty.EmptyDataPackage;
import org.springframework.boot.cassandra.autoconfigure.CassandraAutoConfiguration;
import org.springframework.boot.test.context.assertj.AssertableApplicationContext;
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
import org.springframework.context.annotation.Configuration;

45
spring-boot-project/spring-boot-cassandra/build.gradle

@ -0,0 +1,45 @@ @@ -0,0 +1,45 @@
/*
* Copyright 2012-present 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
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 Cassandra"
dependencies {
api(project(":spring-boot-project:spring-boot"))
api("org.apache.cassandra:java-driver-core")
optional(project(":spring-boot-project:spring-boot-autoconfigure"))
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:cassandra")
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")
}

2
spring-boot-project/spring-boot-autoconfigure-all/src/dockerTest/java/org/springframework/boot/autoconfigure/cassandra/CassandraAutoConfigurationIntegrationTests.java → spring-boot-project/spring-boot-cassandra/src/dockerTest/java/org/springframework/boot/cassandra/autoconfigure/CassandraAutoConfigurationIntegrationTests.java

@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.autoconfigure.cassandra;
package org.springframework.boot.cassandra.autoconfigure;
import com.datastax.oss.driver.api.core.CqlSession;
import com.datastax.oss.driver.api.core.config.DriverConfigLoader;

2
spring-boot-project/spring-boot-autoconfigure-all/src/dockerTest/java/org/springframework/boot/autoconfigure/cassandra/CassandraAutoConfigurationWithPasswordAuthenticationIntegrationTests.java → spring-boot-project/spring-boot-cassandra/src/dockerTest/java/org/springframework/boot/cassandra/autoconfigure/CassandraAutoConfigurationWithPasswordAuthenticationIntegrationTests.java

@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.autoconfigure.cassandra;
package org.springframework.boot.cassandra.autoconfigure;
import java.net.InetSocketAddress;
import java.nio.charset.StandardCharsets;

16
spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/cassandra/CassandraAutoConfiguration.java → spring-boot-project/spring-boot-cassandra/src/main/java/org/springframework/boot/cassandra/autoconfigure/CassandraAutoConfiguration.java

@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.autoconfigure.cassandra;
package org.springframework.boot.cassandra.autoconfigure;
import java.io.IOException;
import java.time.Duration;
@ -39,14 +39,14 @@ import org.springframework.beans.factory.ObjectProvider; @@ -39,14 +39,14 @@ import org.springframework.beans.factory.ObjectProvider;
import org.springframework.beans.factory.config.ConfigurableBeanFactory;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.cassandra.CassandraProperties.Connection;
import org.springframework.boot.autoconfigure.cassandra.CassandraProperties.Controlconnection;
import org.springframework.boot.autoconfigure.cassandra.CassandraProperties.Request;
import org.springframework.boot.autoconfigure.cassandra.CassandraProperties.Ssl;
import org.springframework.boot.autoconfigure.cassandra.CassandraProperties.Throttler;
import org.springframework.boot.autoconfigure.cassandra.CassandraProperties.ThrottlerType;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.cassandra.autoconfigure.CassandraProperties.Connection;
import org.springframework.boot.cassandra.autoconfigure.CassandraProperties.Controlconnection;
import org.springframework.boot.cassandra.autoconfigure.CassandraProperties.Request;
import org.springframework.boot.cassandra.autoconfigure.CassandraProperties.Ssl;
import org.springframework.boot.cassandra.autoconfigure.CassandraProperties.Throttler;
import org.springframework.boot.cassandra.autoconfigure.CassandraProperties.ThrottlerType;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.boot.context.properties.PropertyMapper;
import org.springframework.boot.ssl.SslBundle;
@ -72,7 +72,7 @@ import org.springframework.util.StringUtils; @@ -72,7 +72,7 @@ import org.springframework.util.StringUtils;
* @author Andy Wilkinson
* @author Phillip Webb
* @author Scott Frederick
* @since 1.3.0
* @since 4.0.0
*/
@AutoConfiguration
@ConditionalOnClass(CqlSession.class)

4
spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/cassandra/CassandraConnectionDetails.java → spring-boot-project/spring-boot-cassandra/src/main/java/org/springframework/boot/cassandra/autoconfigure/CassandraConnectionDetails.java

@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.autoconfigure.cassandra;
package org.springframework.boot.cassandra.autoconfigure;
import java.util.List;
@ -27,7 +27,7 @@ import org.springframework.boot.ssl.SslBundle; @@ -27,7 +27,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 CassandraConnectionDetails extends ConnectionDetails {

4
spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/cassandra/CassandraProperties.java → spring-boot-project/spring-boot-cassandra/src/main/java/org/springframework/boot/cassandra/autoconfigure/CassandraProperties.java

@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.autoconfigure.cassandra;
package org.springframework.boot.cassandra.autoconfigure;
import java.time.Duration;
import java.util.List;
@ -32,7 +32,7 @@ import org.springframework.core.io.Resource; @@ -32,7 +32,7 @@ import org.springframework.core.io.Resource;
* @author Mark Paluch
* @author Stephane Nicoll
* @author Scott Frederick
* @since 1.3.0
* @since 4.0.0
*/
@ConfigurationProperties("spring.cassandra")
public class CassandraProperties {

4
spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/cassandra/CqlSessionBuilderCustomizer.java → spring-boot-project/spring-boot-cassandra/src/main/java/org/springframework/boot/cassandra/autoconfigure/CqlSessionBuilderCustomizer.java

@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.autoconfigure.cassandra;
package org.springframework.boot.cassandra.autoconfigure;
import com.datastax.oss.driver.api.core.CqlSession;
import com.datastax.oss.driver.api.core.CqlSessionBuilder;
@ -25,7 +25,7 @@ import com.datastax.oss.driver.api.core.CqlSessionBuilder; @@ -25,7 +25,7 @@ import com.datastax.oss.driver.api.core.CqlSessionBuilder;
* auto-configuration.
*
* @author Stephane Nicoll
* @since 2.3.0
* @since 4.0.0
*/
@FunctionalInterface
public interface CqlSessionBuilderCustomizer {

4
spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/cassandra/DriverConfigLoaderBuilderCustomizer.java → spring-boot-project/spring-boot-cassandra/src/main/java/org/springframework/boot/cassandra/autoconfigure/DriverConfigLoaderBuilderCustomizer.java

@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.autoconfigure.cassandra;
package org.springframework.boot.cassandra.autoconfigure;
import com.datastax.oss.driver.api.core.config.DriverConfigLoader;
import com.datastax.oss.driver.api.core.config.ProgrammaticDriverConfigLoaderBuilder;
@ -25,7 +25,7 @@ import com.datastax.oss.driver.api.core.config.ProgrammaticDriverConfigLoaderBui @@ -25,7 +25,7 @@ import com.datastax.oss.driver.api.core.config.ProgrammaticDriverConfigLoaderBui
* retaining default auto-configuration.
*
* @author Stephane Nicoll
* @since 2.3.0
* @since 4.0.0
*/
public interface DriverConfigLoaderBuilderCustomizer {

2
spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/cassandra/package-info.java → spring-boot-project/spring-boot-cassandra/src/main/java/org/springframework/boot/cassandra/autoconfigure/package-info.java

@ -17,4 +17,4 @@ @@ -17,4 +17,4 @@
/**
* Auto-configuration for Cassandra.
*/
package org.springframework.boot.autoconfigure.cassandra;
package org.springframework.boot.cassandra.autoconfigure;

68
spring-boot-project/spring-boot-cassandra/src/main/resources/META-INF/additional-spring-configuration-metadata.json

@ -0,0 +1,68 @@ @@ -0,0 +1,68 @@
{
"groups": [],
"properties": [
{
"name": "spring.cassandra.compression",
"defaultValue": "none"
},
{
"name": "spring.cassandra.connection.connect-timeout",
"defaultValue": "5s"
},
{
"name": "spring.cassandra.connection.init-query-timeout",
"defaultValue": "5s"
},
{
"name": "spring.cassandra.contact-points",
"defaultValue": [
"127.0.0.1:9042"
]
},
{
"name": "spring.cassandra.controlconnection.timeout",
"defaultValue": "5s"
},
{
"name": "spring.cassandra.pool.heartbeat-interval",
"defaultValue": "30s"
},
{
"name": "spring.cassandra.pool.idle-timeout",
"defaultValue": "5s"
},
{
"name": "spring.cassandra.request.page-size",
"defaultValue": 5000
},
{
"name": "spring.cassandra.request.throttler.type",
"defaultValue": "none"
},
{
"name": "spring.cassandra.request.timeout",
"defaultValue": "2s"
},
{
"name": "spring.cassandra.ssl",
"type": "java.lang.Boolean",
"deprecation": {
"replacement": "spring.cassandra.ssl.enabled",
"level": "error"
}
}
],
"hints": [
{
"name": "spring.cassandra.schema-action",
"providers": [
{
"name": "handle-as",
"parameters": {
"target": "org.springframework.data.cassandra.config.SchemaAction"
}
}
]
}
]
}

1
spring-boot-project/spring-boot-cassandra/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports

@ -0,0 +1 @@ @@ -0,0 +1 @@
org.springframework.boot.cassandra.autoconfigure.CassandraAutoConfiguration

10
spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/cassandra/CassandraAutoConfigurationTests.java → spring-boot-project/spring-boot-cassandra/src/test/java/org/springframework/boot/cassandra/autoconfigure/CassandraAutoConfigurationTests.java

@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.autoconfigure.cassandra;
package org.springframework.boot.cassandra.autoconfigure;
import java.time.Duration;
import java.util.Collections;
@ -34,8 +34,8 @@ import org.junit.jupiter.api.Test; @@ -34,8 +34,8 @@ import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.BeanCreationException;
import org.springframework.boot.autoconfigure.AutoConfigurations;
import org.springframework.boot.autoconfigure.cassandra.CassandraAutoConfiguration.PropertiesCassandraConnectionDetails;
import org.springframework.boot.autoconfigure.ssl.SslAutoConfiguration;
import org.springframework.boot.cassandra.autoconfigure.CassandraAutoConfiguration.PropertiesCassandraConnectionDetails;
import org.springframework.boot.ssl.NoSuchSslBundleException;
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
import org.springframework.boot.testsupport.classpath.resources.WithPackageResources;
@ -346,7 +346,7 @@ class CassandraAutoConfigurationTests { @@ -346,7 +346,7 @@ class CassandraAutoConfigurationTests {
@Test
void driverConfigLoaderWithConfigComplementSettings() {
String configLocation = "org/springframework/boot/autoconfigure/cassandra/simple.conf";
String configLocation = "org/springframework/boot/cassandra/autoconfigure/simple.conf";
this.contextRunner
.withPropertyValues("spring.cassandra.session-name=testcluster",
"spring.cassandra.config=" + configLocation)
@ -365,7 +365,7 @@ class CassandraAutoConfigurationTests { @@ -365,7 +365,7 @@ class CassandraAutoConfigurationTests {
@Test // gh-31238
void driverConfigLoaderWithConfigOverridesDefaults() {
String configLocation = "org/springframework/boot/autoconfigure/cassandra/override-defaults.conf";
String configLocation = "org/springframework/boot/cassandra/autoconfigure/override-defaults.conf";
this.contextRunner.withPropertyValues("spring.cassandra.config=" + configLocation).run((context) -> {
DriverExecutionProfile actual = context.getBean(DriverConfigLoader.class)
.getInitialConfig()
@ -400,7 +400,7 @@ class CassandraAutoConfigurationTests { @@ -400,7 +400,7 @@ class CassandraAutoConfigurationTests {
@Test
void driverConfigLoaderWithConfigCreateProfiles() {
String configLocation = "org/springframework/boot/autoconfigure/cassandra/profiles.conf";
String configLocation = "org/springframework/boot/cassandra/autoconfigure/profiles.conf";
this.contextRunner.withPropertyValues("spring.cassandra.config=" + configLocation).run((context) -> {
assertThat(context).hasSingleBean(DriverConfigLoader.class);
DriverConfig driverConfig = context.getBean(DriverConfigLoader.class).getInitialConfig();

2
spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/cassandra/CassandraPropertiesTests.java → spring-boot-project/spring-boot-cassandra/src/test/java/org/springframework/boot/cassandra/autoconfigure/CassandraPropertiesTests.java

@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.autoconfigure.cassandra;
package org.springframework.boot.cassandra.autoconfigure;
import java.time.Duration;

0
spring-boot-project/spring-boot-autoconfigure-all/src/test/resources/org/springframework/boot/autoconfigure/cassandra/override-defaults.conf → spring-boot-project/spring-boot-cassandra/src/test/resources/org/springframework/boot/cassandra/autoconfigure/override-defaults.conf

0
spring-boot-project/spring-boot-autoconfigure-all/src/test/resources/org/springframework/boot/autoconfigure/cassandra/profiles.conf → spring-boot-project/spring-boot-cassandra/src/test/resources/org/springframework/boot/cassandra/autoconfigure/profiles.conf

0
spring-boot-project/spring-boot-autoconfigure-all/src/test/resources/org/springframework/boot/autoconfigure/cassandra/simple.conf → spring-boot-project/spring-boot-cassandra/src/test/resources/org/springframework/boot/cassandra/autoconfigure/simple.conf

0
spring-boot-project/spring-boot-autoconfigure-all/src/test/resources/org/springframework/boot/autoconfigure/cassandra/test.jks → spring-boot-project/spring-boot-cassandra/src/test/resources/org/springframework/boot/cassandra/autoconfigure/test.jks

1
spring-boot-project/spring-boot-dependencies/build.gradle

@ -1992,6 +1992,7 @@ bom { @@ -1992,6 +1992,7 @@ bom {
"spring-boot-autoconfigure-processor",
"spring-boot-batch",
"spring-boot-buildpack-platform",
"spring-boot-cassandra",
"spring-boot-configuration-metadata",
"spring-boot-configuration-processor",
"spring-boot-couchbase",

1
spring-boot-project/spring-boot-docker-compose/build.gradle

@ -55,6 +55,7 @@ dependencies { @@ -55,6 +55,7 @@ dependencies {
optional(project(":spring-boot-project:spring-boot-artemis"))
optional(project(":spring-boot-project:spring-boot-autoconfigure-all"))
optional(project(":spring-boot-project:spring-boot-actuator-autoconfigure"))
optional(project(":spring-boot-project:spring-boot-cassandra"))
optional(project(":spring-boot-project:spring-boot-elasticsearch"))
optional(project(":spring-boot-project:spring-boot-flyway"))
optional(project(":spring-boot-project:spring-boot-hazelcast"))

4
spring-boot-project/spring-boot-docker-compose/src/dockerTest/java/org/springframework/boot/docker/compose/service/connection/cassandra/CassandraDockerComposeConnectionDetailsFactoryIntegrationTests.java

@ -18,8 +18,8 @@ package org.springframework.boot.docker.compose.service.connection.cassandra; @@ -18,8 +18,8 @@ package org.springframework.boot.docker.compose.service.connection.cassandra;
import java.util.List;
import org.springframework.boot.autoconfigure.cassandra.CassandraConnectionDetails;
import org.springframework.boot.autoconfigure.cassandra.CassandraConnectionDetails.Node;
import org.springframework.boot.cassandra.autoconfigure.CassandraConnectionDetails;
import org.springframework.boot.cassandra.autoconfigure.CassandraConnectionDetails.Node;
import org.springframework.boot.docker.compose.service.connection.test.DockerComposeTest;
import org.springframework.boot.testsupport.container.TestImage;

2
spring-boot-project/spring-boot-docker-compose/src/main/java/org/springframework/boot/docker/compose/service/connection/cassandra/CassandraDockerComposeConnectionDetailsFactory.java

@ -18,7 +18,7 @@ package org.springframework.boot.docker.compose.service.connection.cassandra; @@ -18,7 +18,7 @@ package org.springframework.boot.docker.compose.service.connection.cassandra;
import java.util.List;
import org.springframework.boot.autoconfigure.cassandra.CassandraConnectionDetails;
import org.springframework.boot.cassandra.autoconfigure.CassandraConnectionDetails;
import org.springframework.boot.docker.compose.core.RunningService;
import org.springframework.boot.docker.compose.service.connection.DockerComposeConnectionDetailsFactory;
import org.springframework.boot.docker.compose.service.connection.DockerComposeConnectionSource;

2
spring-boot-project/spring-boot-docs/build.gradle

@ -82,6 +82,7 @@ dependencies { @@ -82,6 +82,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-cassandra", 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"))
@ -119,6 +120,7 @@ dependencies { @@ -119,6 +120,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-cassandra", 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"))

4
spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/data/nosql.adoc

@ -501,8 +501,8 @@ The Cassandra driver has its own configuration infrastructure that loads an `app @@ -501,8 +501,8 @@ The Cassandra driver has its own configuration infrastructure that loads an `app
Spring Boot does not look for such a file by default but can load one using `spring.cassandra.config`.
If a property is both present in `+spring.cassandra.*+` and the configuration file, the value in `+spring.cassandra.*+` takes precedence.
For more advanced driver customizations, you can register an arbitrary number of beans that implement javadoc:org.springframework.boot.autoconfigure.cassandra.DriverConfigLoaderBuilderCustomizer[].
The `CqlSession` can be customized with a bean of type javadoc:org.springframework.boot.autoconfigure.cassandra.CqlSessionBuilderCustomizer[].
For more advanced driver customizations, you can register an arbitrary number of beans that implement javadoc:org.springframework.boot.cassandra.autoconfigure.DriverConfigLoaderBuilderCustomizer[].
The `CqlSession` can be customized with a bean of type javadoc:org.springframework.boot.cassandra.autoconfigure.CqlSessionBuilderCustomizer[].
====
NOTE: If you use `CqlSessionBuilder` to create multiple `CqlSession` beans, keep in mind the builder is mutable so make sure to inject a fresh copy for each session.

2
spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/features/dev-services.adoc

@ -89,7 +89,7 @@ The following service connections are currently supported: @@ -89,7 +89,7 @@ The following service connections are currently supported:
| javadoc:org.springframework.boot.autoconfigure.jms.artemis.ArtemisConnectionDetails[]
| Containers named "apache/activemq-artemis"
| javadoc:org.springframework.boot.autoconfigure.cassandra.CassandraConnectionDetails[]
| javadoc:org.springframework.boot.cassandra.autoconfigure.CassandraConnectionDetails[]
| Containers named "cassandra" or "bitnami/cassandra"
| javadoc:org.springframework.boot.elasticsearch.autoconfigure.ElasticsearchConnectionDetails[]

2
spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/testing/testcontainers.adoc

@ -125,7 +125,7 @@ The following service connection factories are provided in the `spring-boot-test @@ -125,7 +125,7 @@ The following service connection factories are provided in the `spring-boot-test
| javadoc:org.springframework.boot.autoconfigure.jms.artemis.ArtemisConnectionDetails[]
| Containers of type javadoc:org.testcontainers.activemq.ArtemisContainer[]
| javadoc:org.springframework.boot.autoconfigure.cassandra.CassandraConnectionDetails[]
| javadoc:org.springframework.boot.cassandra.autoconfigure.CassandraConnectionDetails[]
| Containers of type javadoc:org.testcontainers.cassandra.CassandraContainer[]
| javadoc:org.springframework.boot.couchbase.autoconfigure.CouchbaseConnectionDetails[]

1
spring-boot-project/spring-boot-starters/spring-boot-starter-data-cassandra-reactive/build.gradle

@ -22,6 +22,7 @@ description = "Starter for using Cassandra distributed database and Spring Data @@ -22,6 +22,7 @@ description = "Starter for using Cassandra distributed database and Spring Data
dependencies {
api(project(":spring-boot-project:spring-boot-starters:spring-boot-starter"))
api(project(":spring-boot-project:spring-boot-cassandra"))
api(project(":spring-boot-project:spring-boot-tx"))
api("org.springframework.data:spring-data-cassandra")
api("io.projectreactor:reactor-core")

1
spring-boot-project/spring-boot-starters/spring-boot-starter-data-cassandra/build.gradle

@ -22,6 +22,7 @@ description = "Starter for using Cassandra distributed database and Spring Data @@ -22,6 +22,7 @@ description = "Starter for using Cassandra distributed database and Spring Data
dependencies {
api(project(":spring-boot-project:spring-boot-starters:spring-boot-starter"))
api(project(":spring-boot-project:spring-boot-cassandra"))
api(project(":spring-boot-project:spring-boot-tx"))
api("org.springframework.data:spring-data-cassandra")
}

1
spring-boot-project/spring-boot-test-autoconfigure/build.gradle

@ -53,6 +53,7 @@ dependencies { @@ -53,6 +53,7 @@ dependencies {
dockerTestRuntimeOnly("io.lettuce:lettuce-core")
dockerTestRuntimeOnly("org.springframework.data:spring-data-redis")
optional(project(":spring-boot-project:spring-boot-cassandra"))
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"))

2
spring-boot-project/spring-boot-test-autoconfigure/src/main/resources/META-INF/spring/org.springframework.boot.test.autoconfigure.data.cassandra.AutoConfigureDataCassandra.imports

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
# AutoConfigureDataCassandra auto-configuration imports
org.springframework.boot.autoconfigure.cassandra.CassandraAutoConfiguration
org.springframework.boot.cassandra.autoconfigure.CassandraAutoConfiguration
org.springframework.boot.autoconfigure.data.cassandra.CassandraDataAutoConfiguration
org.springframework.boot.autoconfigure.data.cassandra.CassandraReactiveDataAutoConfiguration
org.springframework.boot.autoconfigure.data.cassandra.CassandraReactiveRepositoriesAutoConfiguration

2
spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/actuate/observability/AutoConfigureObservabilitySpringBootApplication.java

@ -19,9 +19,9 @@ package org.springframework.boot.test.autoconfigure.actuate.observability; @@ -19,9 +19,9 @@ package org.springframework.boot.test.autoconfigure.actuate.observability;
import org.springframework.boot.SpringBootConfiguration;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.cassandra.CassandraAutoConfiguration;
import org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration;
import org.springframework.boot.autoconfigure.mongo.MongoReactiveAutoConfiguration;
import org.springframework.boot.cassandra.autoconfigure.CassandraAutoConfiguration;
/**
* Example {@link SpringBootApplication @SpringBootApplication} for use with

2
spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/json/app/ExampleJsonApplication.java

@ -17,7 +17,7 @@ @@ -17,7 +17,7 @@
package org.springframework.boot.test.autoconfigure.json.app;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.cassandra.CassandraAutoConfiguration;
import org.springframework.boot.cassandra.autoconfigure.CassandraAutoConfiguration;
import org.springframework.boot.test.autoconfigure.json.JsonTest;
/**

2
spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/override/OverrideAutoConfigurationSpringBootApplication.java

@ -19,7 +19,7 @@ package org.springframework.boot.test.autoconfigure.override; @@ -19,7 +19,7 @@ package org.springframework.boot.test.autoconfigure.override;
import org.springframework.boot.SpringBootConfiguration;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.cassandra.CassandraAutoConfiguration;
import org.springframework.boot.cassandra.autoconfigure.CassandraAutoConfiguration;
import org.springframework.boot.test.autoconfigure.OverrideAutoConfiguration;
/**

2
spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/restdocs/RestDocsTestApplication.java

@ -18,8 +18,8 @@ package org.springframework.boot.test.autoconfigure.restdocs; @@ -18,8 +18,8 @@ package org.springframework.boot.test.autoconfigure.restdocs;
import org.springframework.boot.actuate.autoconfigure.security.servlet.ManagementWebSecurityAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.cassandra.CassandraAutoConfiguration;
import org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration;
import org.springframework.boot.cassandra.autoconfigure.CassandraAutoConfiguration;
/**
* Test application used with {@link AutoConfigureRestDocs @AutoConfigureRestDocs} tests.

2
spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/web/client/AutoConfigureMockRestServiceServerWithRestClientIntegrationTests.java

@ -20,7 +20,7 @@ import org.junit.jupiter.api.Test; @@ -20,7 +20,7 @@ import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.cassandra.CassandraAutoConfiguration;
import org.springframework.boot.cassandra.autoconfigure.CassandraAutoConfiguration;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

2
spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/web/client/AutoConfigureMockRestServiceServerWithRestTemplateRootUriIntegrationTests.java

@ -21,7 +21,7 @@ import org.junit.jupiter.api.Test; @@ -21,7 +21,7 @@ import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.cassandra.CassandraAutoConfiguration;
import org.springframework.boot.cassandra.autoconfigure.CassandraAutoConfiguration;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.web.client.RestTemplateBuilder;
import org.springframework.context.annotation.Bean;

2
spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/web/client/AutoConfigureWebClientWithRestTemplateIntegrationTests.java

@ -20,7 +20,7 @@ import org.junit.jupiter.api.Test; @@ -20,7 +20,7 @@ import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.cassandra.CassandraAutoConfiguration;
import org.springframework.boot.cassandra.autoconfigure.CassandraAutoConfiguration;
import org.springframework.boot.test.autoconfigure.jdbc.AutoConfigureTestDatabase;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.context.annotation.Configuration;

2
spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/web/reactive/webclient/ExampleWebFluxApplication.java

@ -17,7 +17,7 @@ @@ -17,7 +17,7 @@
package org.springframework.boot.test.autoconfigure.web.reactive.webclient;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.cassandra.CassandraAutoConfiguration;
import org.springframework.boot.cassandra.autoconfigure.CassandraAutoConfiguration;
import org.springframework.boot.test.autoconfigure.web.reactive.WebFluxTest;
/**

2
spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/web/servlet/mockmvc/ExampleWebMvcApplication.java

@ -17,7 +17,7 @@ @@ -17,7 +17,7 @@
package org.springframework.boot.test.autoconfigure.web.servlet.mockmvc;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.cassandra.CassandraAutoConfiguration;
import org.springframework.boot.cassandra.autoconfigure.CassandraAutoConfiguration;
import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest;
/**

2
spring-boot-project/spring-boot-testcontainers/build.gradle

@ -29,6 +29,7 @@ dependencies { @@ -29,6 +29,7 @@ dependencies {
api(project(":spring-boot-project:spring-boot-autoconfigure-all"))
api("org.testcontainers:testcontainers")
dockerTestImplementation(project(":spring-boot-project:spring-boot-cassandra"))
dockerTestImplementation(project(":spring-boot-project:spring-boot-couchbase"))
dockerTestImplementation(project(":spring-boot-project:spring-boot-flyway"))
dockerTestImplementation(project(":spring-boot-project:spring-boot-jdbc"))
@ -76,6 +77,7 @@ dependencies { @@ -76,6 +77,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-cassandra"))
optional(project(":spring-boot-project:spring-boot-couchbase"))
optional(project(":spring-boot-project:spring-boot-elasticsearch"))
optional(project(":spring-boot-project:spring-boot-flyway"))

4
spring-boot-project/spring-boot-testcontainers/src/dockerTest/java/org/springframework/boot/testcontainers/service/connection/cassandra/CassandraContainerConnectionDetailsFactoryTests.java

@ -24,8 +24,8 @@ import org.testcontainers.junit.jupiter.Testcontainers; @@ -24,8 +24,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.cassandra.CassandraAutoConfiguration;
import org.springframework.boot.autoconfigure.cassandra.CassandraConnectionDetails;
import org.springframework.boot.cassandra.autoconfigure.CassandraAutoConfiguration;
import org.springframework.boot.cassandra.autoconfigure.CassandraConnectionDetails;
import org.springframework.boot.testcontainers.service.connection.ServiceConnection;
import org.springframework.boot.testsupport.container.TestImage;
import org.springframework.context.annotation.Configuration;

4
spring-boot-project/spring-boot-testcontainers/src/dockerTest/java/org/springframework/boot/testcontainers/service/connection/cassandra/DeprecatedCassandraContainerConnectionDetailsFactoryTests.java

@ -24,8 +24,8 @@ import org.testcontainers.junit.jupiter.Testcontainers; @@ -24,8 +24,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.cassandra.CassandraAutoConfiguration;
import org.springframework.boot.autoconfigure.cassandra.CassandraConnectionDetails;
import org.springframework.boot.cassandra.autoconfigure.CassandraAutoConfiguration;
import org.springframework.boot.cassandra.autoconfigure.CassandraConnectionDetails;
import org.springframework.boot.testcontainers.service.connection.ServiceConnection;
import org.springframework.boot.testsupport.container.TestImage;
import org.springframework.context.annotation.Configuration;

2
spring-boot-project/spring-boot-testcontainers/src/main/java/org/springframework/boot/testcontainers/service/connection/cassandra/CassandraContainerConnectionDetailsFactory.java

@ -21,7 +21,7 @@ import java.util.List; @@ -21,7 +21,7 @@ import java.util.List;
import org.testcontainers.cassandra.CassandraContainer;
import org.springframework.boot.autoconfigure.cassandra.CassandraConnectionDetails;
import org.springframework.boot.cassandra.autoconfigure.CassandraConnectionDetails;
import org.springframework.boot.ssl.SslBundle;
import org.springframework.boot.testcontainers.service.connection.ContainerConnectionDetailsFactory;
import org.springframework.boot.testcontainers.service.connection.ContainerConnectionSource;

2
spring-boot-project/spring-boot-testcontainers/src/main/java/org/springframework/boot/testcontainers/service/connection/cassandra/DeprecatedCassandraContainerConnectionDetailsFactory.java

@ -21,7 +21,7 @@ import java.util.List; @@ -21,7 +21,7 @@ import java.util.List;
import org.testcontainers.containers.CassandraContainer;
import org.springframework.boot.autoconfigure.cassandra.CassandraConnectionDetails;
import org.springframework.boot.cassandra.autoconfigure.CassandraConnectionDetails;
import org.springframework.boot.ssl.SslBundle;
import org.springframework.boot.testcontainers.service.connection.ContainerConnectionDetailsFactory;
import org.springframework.boot.testcontainers.service.connection.ContainerConnectionSource;

Loading…
Cancel
Save