Create spring-boot-data-cassandra module

This commit is contained in:
Stéphane Nicoll 2025-03-28 08:35:23 +01:00 committed by Andy Wilkinson
parent 41f595cde0
commit c3a56bf6a0
36 changed files with 368 additions and 375 deletions

View File

@ -52,6 +52,7 @@ 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-cassandra"
include "spring-boot-project:spring-boot-data-jpa"
include "spring-boot-project:spring-boot-data-ldap"
include "spring-boot-project:spring-boot-data-mongodb"

View File

@ -20,8 +20,8 @@ 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-cassandra"))
optional(project(":spring-boot-project:spring-boot-data-jpa"))
optional(project(":spring-boot-project:spring-boot-data-mongodb"))
optional(project(":spring-boot-project:spring-boot-elasticsearch"))
@ -140,9 +140,6 @@ dependencies {
optional("org.springframework:spring-webmvc")
optional("org.springframework.amqp:spring-rabbit")
optional("org.springframework.batch:spring-batch-core")
optional("org.springframework.data:spring-data-cassandra") {
exclude group: "org.slf4j", module: "jcl-over-slf4j"
}
optional("org.springframework.data:spring-data-couchbase")
optional("org.springframework.data:spring-data-jpa")
optional("org.springframework.data:spring-data-ldap")

View File

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

View File

@ -1,5 +1,5 @@
/*
* Copyright 2012-2022 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.
@ -25,7 +25,7 @@ import org.springframework.boot.actuate.cassandra.CassandraDriverReactiveHealthI
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.data.cassandra.CassandraReactiveDataAutoConfiguration;
import org.springframework.boot.data.cassandra.autoconfigure.CassandraReactiveDataAutoConfiguration;
import org.springframework.context.annotation.Import;
/**

View File

@ -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.data.cassandra.CassandraDataAutoConfiguration;
import org.springframework.boot.autoconfigure.data.elasticsearch.ElasticsearchDataAutoConfiguration;
import org.springframework.boot.autoconfigure.data.neo4j.Neo4jDataAutoConfiguration;
import org.springframework.boot.autoconfigure.data.neo4j.Neo4jRepositoriesAutoConfiguration;
@ -33,6 +32,7 @@ import org.springframework.boot.autoconfigure.data.redis.RedisRepositoriesAutoCo
import org.springframework.boot.autoconfigure.data.rest.RepositoryRestMvcAutoConfiguration;
import org.springframework.boot.cassandra.autoconfigure.CassandraAutoConfiguration;
import org.springframework.boot.context.annotation.UserConfigurations;
import org.springframework.boot.data.cassandra.autoconfigure.CassandraDataAutoConfiguration;
import org.springframework.boot.data.mongodb.autoconfigure.MongoDataAutoConfiguration;
import org.springframework.boot.data.mongodb.autoconfigure.MongoReactiveDataAutoConfiguration;
import org.springframework.boot.flyway.autoconfigure.FlywayAutoConfiguration;

View File

@ -25,6 +25,7 @@ dependencies {
dockerTestImplementation("org.testcontainers:testcontainers")
optional(project(":spring-boot-project:spring-boot-activemq"))
optional(project(":spring-boot-project:spring-boot-data-cassandra"))
optional(project(":spring-boot-project:spring-boot-flyway"))
optional(project(":spring-boot-project:spring-boot-http"))
optional(project(":spring-boot-project:spring-boot-integration"))
@ -37,9 +38,6 @@ dependencies {
optional(project(":spring-boot-project:spring-boot-undertow"))
optional(project(":spring-boot-project:spring-boot-validation"))
optional(project(":spring-boot-project:spring-boot-webmvc"))
optional("org.apache.cassandra:java-driver-core") {
exclude group: "org.slf4j", module: "jcl-over-slf4j"
}
optional("com.fasterxml.jackson.core:jackson-databind")
optional("com.fasterxml.jackson.datatype:jackson-datatype-jsr310")
optional("com.github.ben-manes.caffeine:caffeine")
@ -86,9 +84,6 @@ dependencies {
optional("org.springframework:spring-webmvc")
optional("org.springframework.graphql:spring-graphql")
optional("org.springframework.amqp:spring-rabbit")
optional("org.springframework.data:spring-data-cassandra") {
exclude group: "org.slf4j", module: "jcl-over-slf4j"
}
optional("org.springframework.data:spring-data-couchbase")
optional("org.springframework.data:spring-data-elasticsearch") {
exclude(group: "commons-logging", module: "commons-logging")

View File

@ -33,7 +33,6 @@ dependencies {
dockerTestImplementation("org.junit.jupiter:junit-jupiter")
dockerTestImplementation("org.mockito:mockito-core")
dockerTestImplementation("org.springframework:spring-test")
dockerTestImplementation("org.testcontainers:cassandra")
dockerTestImplementation("org.testcontainers:couchbase")
dockerTestImplementation("org.testcontainers:elasticsearch")
dockerTestImplementation("org.testcontainers:junit-jupiter")
@ -43,7 +42,6 @@ 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-data-mongodb"))
@ -170,9 +168,6 @@ dependencies {
exclude group: "org.jboss.spec.javax.transaction", module: "jboss-transaction-api_1.2_spec"
}
optional("org.springframework.data:spring-data-rest-webmvc")
optional("org.springframework.data:spring-data-cassandra") {
exclude group: "org.slf4j", module: "jcl-over-slf4j"
}
optional("org.springframework.data:spring-data-elasticsearch") {
exclude group: "org.elasticsearch.client", module: "transport"
}

View File

@ -19,264 +19,6 @@
"description": "Whether to enable the PersistenceExceptionTranslationPostProcessor.",
"defaultValue": true
},
{
"name": "spring.data.cassandra.compression",
"defaultValue": "none",
"deprecation": {
"replacement": "spring.cassandra.compression",
"level": "error"
}
},
{
"name": "spring.data.cassandra.config",
"type": "org.springframework.core.io.Resource",
"deprecation": {
"replacement": "spring.cassandra.config",
"level": "error"
}
},
{
"name": "spring.data.cassandra.connection.connect-timeout",
"defaultValue": "5s",
"deprecation": {
"replacement": "spring.cassandra.connection.connect-timeout",
"level": "error"
}
},
{
"name": "spring.data.cassandra.connection.init-query-timeout",
"defaultValue": "5s",
"deprecation": {
"replacement": "spring.cassandra.connection.init-query-timeout",
"level": "error"
}
},
{
"name": "spring.data.cassandra.contact-points",
"defaultValue": [
"127.0.0.1:9042"
],
"deprecation": {
"replacement": "spring.cassandra.contact-points",
"level": "error"
}
},
{
"name": "spring.data.cassandra.controlconnection.timeout",
"defaultValue": "5s",
"deprecation": {
"replacement": "spring.cassandra.controlconnection.timeout",
"level": "error"
}
},
{
"name": "spring.data.cassandra.jmx-enabled",
"type": "java.lang.Boolean",
"description": "Whether to enable JMX reporting. Default to false as Cassandra JMX reporting is not compatible with Dropwizard Metrics.",
"deprecation": {
"reason": "Cassandra no longer provides JMX metrics.",
"level": "error"
}
},
{
"name": "spring.data.cassandra.keyspace-name",
"type": "java.lang.String",
"deprecation": {
"replacement": "spring.cassandra.keyspace-name",
"level": "error"
}
},
{
"name": "spring.data.cassandra.load-balancing-policy",
"type": "java.lang.Class",
"description": "Class name of the load balancing policy. The class must have a default constructor.",
"deprecation": {
"level": "error"
}
},
{
"name": "spring.data.cassandra.local-datacenter",
"type": "java.lang.String",
"deprecation": {
"replacement": "spring.cassandra.local-datacenter",
"level": "error"
}
},
{
"name": "spring.data.cassandra.password",
"type": "java.lang.String",
"deprecation": {
"replacement": "spring.cassandra.password",
"level": "error"
}
},
{
"name": "spring.data.cassandra.pool.heartbeat-interval",
"defaultValue": "30s",
"deprecation": {
"replacement": "spring.cassandra.pool.heartbeat-interval",
"level": "error"
}
},
{
"name": "spring.data.cassandra.pool.idle-timeout",
"defaultValue": "5s",
"deprecation": {
"replacement": "spring.cassandra.pool.idle-timeout",
"level": "error"
}
},
{
"name": "spring.data.cassandra.pool.max-queue-size",
"type": "java.lang.Integer",
"deprecation": {
"replacement": "spring.cassandra.request.throttler.max-queue-size",
"level": "error"
}
},
{
"name": "spring.data.cassandra.pool.pool-timeout",
"type": "java.time.Duration",
"description": "Pool timeout when trying to acquire a connection from a host's pool.",
"deprecation": {
"reason": "No longer available.",
"level": "error"
}
},
{
"name": "spring.data.cassandra.port",
"type": "java.lang.Integer",
"deprecation": {
"replacement": "spring.cassandra.port",
"level": "error"
}
},
{
"name": "spring.data.cassandra.reconnection-policy",
"type": "java.lang.Class",
"description": "Class name of the reconnection policy. The class must have a default constructor.",
"deprecation": {
"level": "error"
}
},
{
"name": "spring.data.cassandra.repositories.type",
"type": "org.springframework.boot.autoconfigure.data.RepositoryType",
"description": "Type of Cassandra repositories to enable.",
"defaultValue": "auto"
},
{
"name": "spring.data.cassandra.request.consistency",
"type": "com.datastax.oss.driver.api.core.DefaultConsistencyLevel",
"deprecation": {
"replacement": "spring.cassandra.request.consistency",
"level": "error"
}
},
{
"name": "spring.data.cassandra.request.page-size",
"defaultValue": 5000,
"deprecation": {
"replacement": "spring.cassandra.request.page-size",
"level": "error"
}
},
{
"name": "spring.data.cassandra.request.serial-consistency",
"type": "com.datastax.oss.driver.api.core.DefaultConsistencyLevel",
"deprecation": {
"replacement": "spring.cassandra.request.serial-consistency",
"level": "error"
}
},
{
"name": "spring.data.cassandra.request.throttler.drain-interval",
"type": "java.time.Duration",
"deprecation": {
"replacement": "spring.cassandra.request.throttler.drain-interval",
"level": "error"
}
},
{
"name": "spring.data.cassandra.request.throttler.max-concurrent-requests",
"type": "java.lang.Integer",
"deprecation": {
"replacement": "spring.cassandra.request.throttler.max-concurrent-requests",
"level": "error"
}
},
{
"name": "spring.data.cassandra.request.throttler.max-queue-size",
"type": "java.lang.Integer",
"deprecation": {
"replacement": "spring.cassandra.request.throttler.max-queue-size",
"level": "error"
}
},
{
"name": "spring.data.cassandra.request.throttler.max-requests-per-second",
"type": "java.lang.Integer",
"deprecation": {
"replacement": "spring.cassandra.request.throttler.max-requests-per-second",
"level": "error"
}
},
{
"name": "spring.data.cassandra.request.throttler.type",
"defaultValue": "none",
"deprecation": {
"replacement": "spring.cassandra.request.throttler.type",
"level": "error"
}
},
{
"name": "spring.data.cassandra.request.timeout",
"defaultValue": "2s",
"deprecation": {
"replacement": "spring.cassandra.request.timeout",
"level": "error"
}
},
{
"name": "spring.data.cassandra.retry-policy",
"type": "java.lang.Class",
"description": "Class name of the retry policy. The class must have a default constructor.",
"deprecation": {
"level": "error"
}
},
{
"name": "spring.data.cassandra.schema-action",
"type": "java.lang.String",
"deprecation": {
"replacement": "spring.cassandra.schema-action",
"level": "error"
}
},
{
"name": "spring.data.cassandra.session-name",
"type": "java.lang.String",
"deprecation": {
"replacement": "spring.cassandra.session-name",
"level": "error"
}
},
{
"name": "spring.data.cassandra.ssl",
"type": "java.lang.Boolean",
"deprecation": {
"replacement": "spring.cassandra.ssl.enabled",
"level": "error"
}
},
{
"name": "spring.data.cassandra.username",
"type": "java.lang.String",
"deprecation": {
"replacement": "spring.cassandra.username",
"level": "error"
}
},
{
"name": "spring.data.couchbase.consistency",
"type": "org.springframework.data.couchbase.core.query.Consistency",

View File

@ -1,10 +1,6 @@
org.springframework.boot.autoconfigure.aop.AopAutoConfiguration
org.springframework.boot.autoconfigure.cache.CacheAutoConfiguration
org.springframework.boot.autoconfigure.dao.PersistenceExceptionTranslationAutoConfiguration
org.springframework.boot.autoconfigure.data.cassandra.CassandraDataAutoConfiguration
org.springframework.boot.autoconfigure.data.cassandra.CassandraReactiveDataAutoConfiguration
org.springframework.boot.autoconfigure.data.cassandra.CassandraReactiveRepositoriesAutoConfiguration
org.springframework.boot.autoconfigure.data.cassandra.CassandraRepositoriesAutoConfiguration
org.springframework.boot.autoconfigure.data.couchbase.CouchbaseDataAutoConfiguration
org.springframework.boot.autoconfigure.data.couchbase.CouchbaseReactiveDataAutoConfiguration
org.springframework.boot.autoconfigure.data.couchbase.CouchbaseReactiveRepositoriesAutoConfiguration

View File

@ -1,24 +0,0 @@
/*
* Copyright 2012-2019 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.
*/
package org.springframework.boot.autoconfigure.data.alt.cassandra;
import org.springframework.boot.autoconfigure.data.cassandra.city.City;
import org.springframework.data.repository.reactive.ReactiveCrudRepository;
public interface ReactiveCityCassandraRepository extends ReactiveCrudRepository<City, Long> {
}

View File

@ -0,0 +1,32 @@
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 Data Cassandra"
dependencies {
api(project(":spring-boot-project:spring-boot-cassandra"))
api("org.springframework.data:spring-data-cassandra") {
exclude group: "org.slf4j", module: "jcl-over-slf4j"
}
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")
optional(project(":spring-boot-project:spring-boot-autoconfigure"))
optional("io.projectreactor:reactor-core")
testImplementation(project(":spring-boot-project:spring-boot-test"))
testImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support"))
testImplementation(testFixtures(project(":spring-boot-project:spring-boot-autoconfigure")))
testRuntimeOnly("ch.qos.logback:logback-classic")
}

View File

@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.autoconfigure.data.cassandra;
package org.springframework.boot.data.cassandra.autoconfigure;
import com.datastax.oss.driver.api.core.CqlSession;
import com.datastax.oss.driver.api.core.CqlSessionBuilder;
@ -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.data.cassandra.city.City;
import org.springframework.boot.cassandra.autoconfigure.CassandraAutoConfiguration;
import org.springframework.boot.data.cassandra.domain.city.City;
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
import org.springframework.boot.testsupport.container.TestImage;
import org.springframework.context.annotation.Bean;

View File

@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.autoconfigure.data.cassandra;
package org.springframework.boot.data.cassandra.autoconfigure;
import java.util.Collections;
import java.util.List;
@ -57,7 +57,7 @@ import org.springframework.data.cassandra.core.mapping.SimpleUserTypeResolver;
* @author Mark Paluch
* @author Madhura Bhave
* @author Christoph Strobl
* @since 1.3.0
* @since 4.0.0
*/
@AutoConfiguration(afterName = "org.springframework.boot.cassandra.autoconfigure.CassandraAutoConfiguration")
@ConditionalOnClass({ CqlSession.class, CassandraAdminOperations.class })

View File

@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.autoconfigure.data.cassandra;
package org.springframework.boot.data.cassandra.autoconfigure;
import com.datastax.oss.driver.api.core.CqlSession;
import reactor.core.publisher.Flux;
@ -41,7 +41,7 @@ import org.springframework.data.cassandra.core.cql.session.DefaultReactiveSessio
*
* @author Eddú Meléndez
* @author Mark Paluch
* @since 2.0.0
* @since 4.0.0
*/
@AutoConfiguration(after = CassandraDataAutoConfiguration.class)
@ConditionalOnClass({ CqlSession.class, ReactiveCassandraTemplate.class, Flux.class })

View File

@ -1,5 +1,5 @@
/*
* Copyright 2012-2022 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.data.cassandra;
package org.springframework.boot.data.cassandra.autoconfigure;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
@ -34,7 +34,7 @@ import org.springframework.data.cassandra.repository.support.ReactiveCassandraRe
*
* @author Eddú Meléndez
* @author Mark Paluch
* @since 2.0.0
* @since 4.0.0
* @see EnableReactiveCassandraRepositories
*/
@AutoConfiguration(after = CassandraReactiveDataAutoConfiguration.class)

View File

@ -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.data.cassandra;
package org.springframework.boot.data.cassandra.autoconfigure;
import java.lang.annotation.Annotation;

View File

@ -1,5 +1,5 @@
/*
* Copyright 2012-2022 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.data.cassandra;
package org.springframework.boot.data.cassandra.autoconfigure;
import com.datastax.oss.driver.api.core.CqlSession;
@ -34,7 +34,7 @@ import org.springframework.data.cassandra.repository.support.CassandraRepository
* Repositories.
*
* @author Eddú Meléndez
* @since 1.3.0
* @since 4.0.0
* @see EnableCassandraRepositories
*/
@AutoConfiguration

View File

@ -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.data.cassandra;
package org.springframework.boot.data.cassandra.autoconfigure;
import java.lang.annotation.Annotation;

View File

@ -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 Spring Data Cassandra.
*/
package org.springframework.boot.autoconfigure.data.cassandra;
package org.springframework.boot.data.cassandra.autoconfigure;

View File

@ -0,0 +1,263 @@
{
"groups": [],
"properties": [
{
"name": "spring.data.cassandra.compression",
"defaultValue": "none",
"deprecation": {
"replacement": "spring.cassandra.compression",
"level": "error"
}
},
{
"name": "spring.data.cassandra.config",
"type": "org.springframework.core.io.Resource",
"deprecation": {
"replacement": "spring.cassandra.config",
"level": "error"
}
},
{
"name": "spring.data.cassandra.connection.connect-timeout",
"defaultValue": "5s",
"deprecation": {
"replacement": "spring.cassandra.connection.connect-timeout",
"level": "error"
}
},
{
"name": "spring.data.cassandra.connection.init-query-timeout",
"defaultValue": "5s",
"deprecation": {
"replacement": "spring.cassandra.connection.init-query-timeout",
"level": "error"
}
},
{
"name": "spring.data.cassandra.contact-points",
"defaultValue": [
"127.0.0.1:9042"
],
"deprecation": {
"replacement": "spring.cassandra.contact-points",
"level": "error"
}
},
{
"name": "spring.data.cassandra.controlconnection.timeout",
"defaultValue": "5s",
"deprecation": {
"replacement": "spring.cassandra.controlconnection.timeout",
"level": "error"
}
},
{
"name": "spring.data.cassandra.jmx-enabled",
"type": "java.lang.Boolean",
"description": "Whether to enable JMX reporting. Default to false as Cassandra JMX reporting is not compatible with Dropwizard Metrics.",
"deprecation": {
"reason": "Cassandra no longer provides JMX metrics.",
"level": "error"
}
},
{
"name": "spring.data.cassandra.keyspace-name",
"type": "java.lang.String",
"deprecation": {
"replacement": "spring.cassandra.keyspace-name",
"level": "error"
}
},
{
"name": "spring.data.cassandra.load-balancing-policy",
"type": "java.lang.Class",
"description": "Class name of the load balancing policy. The class must have a default constructor.",
"deprecation": {
"level": "error"
}
},
{
"name": "spring.data.cassandra.local-datacenter",
"type": "java.lang.String",
"deprecation": {
"replacement": "spring.cassandra.local-datacenter",
"level": "error"
}
},
{
"name": "spring.data.cassandra.password",
"type": "java.lang.String",
"deprecation": {
"replacement": "spring.cassandra.password",
"level": "error"
}
},
{
"name": "spring.data.cassandra.pool.heartbeat-interval",
"defaultValue": "30s",
"deprecation": {
"replacement": "spring.cassandra.pool.heartbeat-interval",
"level": "error"
}
},
{
"name": "spring.data.cassandra.pool.idle-timeout",
"defaultValue": "5s",
"deprecation": {
"replacement": "spring.cassandra.pool.idle-timeout",
"level": "error"
}
},
{
"name": "spring.data.cassandra.pool.max-queue-size",
"type": "java.lang.Integer",
"deprecation": {
"replacement": "spring.cassandra.request.throttler.max-queue-size",
"level": "error"
}
},
{
"name": "spring.data.cassandra.pool.pool-timeout",
"type": "java.time.Duration",
"description": "Pool timeout when trying to acquire a connection from a host's pool.",
"deprecation": {
"reason": "No longer available.",
"level": "error"
}
},
{
"name": "spring.data.cassandra.port",
"type": "java.lang.Integer",
"deprecation": {
"replacement": "spring.cassandra.port",
"level": "error"
}
},
{
"name": "spring.data.cassandra.reconnection-policy",
"type": "java.lang.Class",
"description": "Class name of the reconnection policy. The class must have a default constructor.",
"deprecation": {
"level": "error"
}
},
{
"name": "spring.data.cassandra.repositories.type",
"type": "org.springframework.boot.autoconfigure.data.RepositoryType",
"description": "Type of Cassandra repositories to enable.",
"defaultValue": "auto"
},
{
"name": "spring.data.cassandra.request.consistency",
"type": "com.datastax.oss.driver.api.core.DefaultConsistencyLevel",
"deprecation": {
"replacement": "spring.cassandra.request.consistency",
"level": "error"
}
},
{
"name": "spring.data.cassandra.request.page-size",
"defaultValue": 5000,
"deprecation": {
"replacement": "spring.cassandra.request.page-size",
"level": "error"
}
},
{
"name": "spring.data.cassandra.request.serial-consistency",
"type": "com.datastax.oss.driver.api.core.DefaultConsistencyLevel",
"deprecation": {
"replacement": "spring.cassandra.request.serial-consistency",
"level": "error"
}
},
{
"name": "spring.data.cassandra.request.throttler.drain-interval",
"type": "java.time.Duration",
"deprecation": {
"replacement": "spring.cassandra.request.throttler.drain-interval",
"level": "error"
}
},
{
"name": "spring.data.cassandra.request.throttler.max-concurrent-requests",
"type": "java.lang.Integer",
"deprecation": {
"replacement": "spring.cassandra.request.throttler.max-concurrent-requests",
"level": "error"
}
},
{
"name": "spring.data.cassandra.request.throttler.max-queue-size",
"type": "java.lang.Integer",
"deprecation": {
"replacement": "spring.cassandra.request.throttler.max-queue-size",
"level": "error"
}
},
{
"name": "spring.data.cassandra.request.throttler.max-requests-per-second",
"type": "java.lang.Integer",
"deprecation": {
"replacement": "spring.cassandra.request.throttler.max-requests-per-second",
"level": "error"
}
},
{
"name": "spring.data.cassandra.request.throttler.type",
"defaultValue": "none",
"deprecation": {
"replacement": "spring.cassandra.request.throttler.type",
"level": "error"
}
},
{
"name": "spring.data.cassandra.request.timeout",
"defaultValue": "2s",
"deprecation": {
"replacement": "spring.cassandra.request.timeout",
"level": "error"
}
},
{
"name": "spring.data.cassandra.retry-policy",
"type": "java.lang.Class",
"description": "Class name of the retry policy. The class must have a default constructor.",
"deprecation": {
"level": "error"
}
},
{
"name": "spring.data.cassandra.schema-action",
"type": "java.lang.String",
"deprecation": {
"replacement": "spring.cassandra.schema-action",
"level": "error"
}
},
{
"name": "spring.data.cassandra.session-name",
"type": "java.lang.String",
"deprecation": {
"replacement": "spring.cassandra.session-name",
"level": "error"
}
},
{
"name": "spring.data.cassandra.ssl",
"type": "java.lang.Boolean",
"deprecation": {
"replacement": "spring.cassandra.ssl.enabled",
"level": "error"
}
},
{
"name": "spring.data.cassandra.username",
"type": "java.lang.String",
"deprecation": {
"replacement": "spring.cassandra.username",
"level": "error"
}
}
]
}

View File

@ -0,0 +1,4 @@
org.springframework.boot.data.cassandra.autoconfigure.CassandraDataAutoConfiguration
org.springframework.boot.data.cassandra.autoconfigure.CassandraReactiveDataAutoConfiguration
org.springframework.boot.data.cassandra.autoconfigure.CassandraReactiveRepositoriesAutoConfiguration
org.springframework.boot.data.cassandra.autoconfigure.CassandraRepositoriesAutoConfiguration

View File

@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.autoconfigure.data.cassandra;
package org.springframework.boot.data.cassandra.autoconfigure;
import java.util.Collections;
@ -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.data.cassandra.city.City;
import org.springframework.boot.autoconfigure.domain.EntityScan;
import org.springframework.boot.cassandra.autoconfigure.CassandraAutoConfiguration;
import org.springframework.boot.data.cassandra.domain.city.City;
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.Bean;
@ -126,7 +126,7 @@ class CassandraDataAutoConfigurationTests {
}
@Configuration(proxyBeanMethods = false)
@EntityScan("org.springframework.boot.autoconfigure.data.cassandra.city")
@EntityScan("org.springframework.boot.data.cassandra.domain.city")
static class EntityScanConfig {
}

View File

@ -1,5 +1,5 @@
/*
* Copyright 2012-2020 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.data.cassandra;
package org.springframework.boot.data.cassandra.autoconfigure;
import com.datastax.oss.driver.api.core.CqlSession;
import com.datastax.oss.driver.api.core.context.DriverContext;

View File

@ -14,14 +14,14 @@
* limitations under the License.
*/
package org.springframework.boot.autoconfigure.data.cassandra;
package org.springframework.boot.data.cassandra.autoconfigure;
import org.junit.jupiter.api.Test;
import org.springframework.boot.autoconfigure.AutoConfigurations;
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.data.cassandra.domain.city.City;
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.cassandra.core.ReactiveCassandraTemplate;
@ -86,7 +86,7 @@ class CassandraReactiveDataAutoConfigurationTests {
}
@Configuration(proxyBeanMethods = false)
@EntityScan("org.springframework.boot.autoconfigure.data.cassandra.city")
@EntityScan("org.springframework.boot.data.cassandra.domain.city")
static class EntityScanConfig {
}

View File

@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.autoconfigure.data.cassandra;
package org.springframework.boot.data.cassandra.autoconfigure;
import com.datastax.oss.driver.api.core.CqlSessionBuilder;
import org.junit.jupiter.api.Test;
@ -22,11 +22,10 @@ import org.junit.jupiter.api.Test;
import org.springframework.boot.autoconfigure.AutoConfigurations;
import org.springframework.boot.autoconfigure.TestAutoConfigurationPackage;
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.data.cassandra.domain.city.City;
import org.springframework.boot.data.cassandra.domain.city.ReactiveCityRepository;
import org.springframework.boot.data.cassandra.domain.empty.EmptyDataPackage;
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Configuration;
@ -73,7 +72,7 @@ class CassandraReactiveRepositoriesAutoConfigurationTests {
@Test
void doesNotTriggerDefaultRepositoryDetectionIfCustomized() {
this.contextRunner.withUserConfiguration(CustomizedConfiguration.class).run((context) -> {
assertThat(context).hasSingleBean(ReactiveCityCassandraRepository.class);
assertThat(context).hasSingleBean(ReactiveCityRepository.class);
assertThat(getManagedTypes(context).toList()).hasSize(1).containsOnly(City.class);
});
}
@ -112,8 +111,8 @@ class CassandraReactiveRepositoriesAutoConfigurationTests {
}
@Configuration(proxyBeanMethods = false)
@TestAutoConfigurationPackage(CassandraReactiveRepositoriesAutoConfigurationTests.class)
@EnableReactiveCassandraRepositories(basePackageClasses = ReactiveCityCassandraRepository.class)
@TestAutoConfigurationPackage(City.class)
@EnableReactiveCassandraRepositories(basePackageClasses = ReactiveCityRepository.class)
@Import(CassandraMockConfiguration.class)
static class CustomizedConfiguration {

View File

@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.autoconfigure.data.cassandra;
package org.springframework.boot.data.cassandra.autoconfigure;
import com.datastax.oss.driver.api.core.CqlSessionBuilder;
import org.junit.jupiter.api.Test;
@ -22,11 +22,10 @@ import org.junit.jupiter.api.Test;
import org.springframework.boot.autoconfigure.AutoConfigurations;
import org.springframework.boot.autoconfigure.TestAutoConfigurationPackage;
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.data.cassandra.domain.city.City;
import org.springframework.boot.data.cassandra.domain.city.CityRepository;
import org.springframework.boot.data.cassandra.domain.empty.EmptyDataPackage;
import org.springframework.boot.test.context.assertj.AssertableApplicationContext;
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
import org.springframework.context.annotation.Configuration;
@ -71,7 +70,7 @@ class CassandraRepositoriesAutoConfigurationTests {
@Test
void doesNotTriggerDefaultRepositoryDetectionIfCustomized() {
this.contextRunner.withUserConfiguration(CustomizedConfiguration.class).run((context) -> {
assertThat(context).hasSingleBean(CityCassandraRepository.class);
assertThat(context).hasSingleBean(CityRepository.class);
assertThat(getManagedTypes(context).toList()).hasSize(1).containsOnly(City.class);
});
}
@ -110,8 +109,8 @@ class CassandraRepositoriesAutoConfigurationTests {
}
@Configuration(proxyBeanMethods = false)
@TestAutoConfigurationPackage(CassandraRepositoriesAutoConfigurationTests.class)
@EnableCassandraRepositories(basePackageClasses = CityCassandraRepository.class)
@TestAutoConfigurationPackage(City.class)
@EnableCassandraRepositories(basePackageClasses = CityRepository.class)
@Import(CassandraMockConfiguration.class)
static class CustomizedConfiguration {

View File

@ -1,5 +1,5 @@
/*
* Copyright 2012-2020 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.data.cassandra.city;
package org.springframework.boot.data.cassandra.domain.city;
import org.springframework.data.cassandra.core.mapping.CassandraType;
import org.springframework.data.cassandra.core.mapping.CassandraType.Name;

View File

@ -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.
@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.autoconfigure.data.cassandra.city;
package org.springframework.boot.data.cassandra.domain.city;
import org.springframework.data.repository.Repository;

View File

@ -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.
@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.autoconfigure.data.cassandra.city;
package org.springframework.boot.data.cassandra.domain.city;
import org.springframework.data.repository.reactive.ReactiveCrudRepository;

View File

@ -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.
@ -14,11 +14,8 @@
* limitations under the License.
*/
package org.springframework.boot.autoconfigure.data.alt.cassandra;
package org.springframework.boot.data.cassandra.domain.empty;
import org.springframework.boot.autoconfigure.data.cassandra.city.City;
import org.springframework.data.repository.Repository;
public interface CityCassandraRepository extends Repository<City, Long> {
public class EmptyDataPackage {
}

View File

@ -2025,6 +2025,7 @@ bom {
"spring-boot-configuration-metadata",
"spring-boot-configuration-processor",
"spring-boot-couchbase",
"spring-boot-data-cassandra",
"spring-boot-data-jpa",
"spring-boot-data-ldap",
"spring-boot-data-mongodb",

View File

@ -62,6 +62,7 @@ dependencies {
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-cassandra", configuration: "autoConfigurationMetadata"))
autoConfiguration(project(path: ":spring-boot-project:spring-boot-data-jpa", configuration: "autoConfigurationMetadata"))
autoConfiguration(project(path: ":spring-boot-project:spring-boot-data-ldap", configuration: "autoConfigurationMetadata"))
autoConfiguration(project(path: ":spring-boot-project:spring-boot-data-mongodb", configuration: "autoConfigurationMetadata"))
@ -115,6 +116,7 @@ dependencies {
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-cassandra", configuration: "configurationPropertiesMetadata"))
configurationProperties(project(path: ":spring-boot-project:spring-boot-data-jpa", configuration: "configurationPropertiesMetadata"))
configurationProperties(project(path: ":spring-boot-project:spring-boot-data-ldap", configuration: "configurationPropertiesMetadata"))
configurationProperties(project(path: ":spring-boot-project:spring-boot-devtools", configuration: "configurationPropertiesMetadata"))
@ -163,6 +165,7 @@ dependencies {
implementation(project(path: ":spring-boot-project:spring-boot-actuator-autoconfigure"))
implementation(project(path: ":spring-boot-project:spring-boot-amqp"))
implementation(project(path: ":spring-boot-project:spring-boot-autoconfigure-all"))
implementation(project(path: ":spring-boot-project:spring-boot-data-cassandra"))
implementation(project(path: ":spring-boot-project:spring-boot-devtools"))
implementation(project(path: ":spring-boot-project:spring-boot-docker-compose"))
implementation(project(path: ":spring-boot-project:spring-boot-http"))
@ -237,7 +240,6 @@ dependencies {
implementation("org.springframework.amqp:spring-amqp")
implementation("org.springframework.amqp:spring-rabbit")
implementation("org.springframework.batch:spring-batch-core")
implementation("org.springframework.data:spring-data-cassandra")
implementation("org.springframework.data:spring-data-couchbase")
implementation("org.springframework.data:spring-data-elasticsearch") {
exclude group: "commons-logging", module: "commons-logging"

View File

@ -6,8 +6,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-data-cassandra"))
api(project(":spring-boot-project:spring-boot-tx"))
api("org.springframework.data:spring-data-cassandra")
api("io.projectreactor:reactor-core")
}

View File

@ -6,7 +6,6 @@ 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-data-cassandra"))
api(project(":spring-boot-project:spring-boot-tx"))
api("org.springframework.data:spring-data-cassandra")
}

View File

@ -36,8 +36,8 @@ 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-cassandra"))
optional(project(":spring-boot-project:spring-boot-data-jpa"))
optional(project(":spring-boot-project:spring-boot-data-ldap"))
optional(project(":spring-boot-project:spring-boot-data-mongodb"))
@ -82,9 +82,6 @@ dependencies {
optional("org.springframework:spring-test")
optional("org.springframework:spring-web")
optional("org.springframework:spring-webflux")
optional("org.springframework.data:spring-data-cassandra") {
exclude group: "org.slf4j", module: "jcl-over-slf4j"
}
optional("org.springframework.data:spring-data-couchbase")
optional("org.springframework.data:spring-data-elasticsearch")
optional("org.springframework.data:spring-data-jdbc")

View File

@ -1,8 +1,8 @@
# AutoConfigureDataCassandra auto-configuration imports
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
org.springframework.boot.autoconfigure.data.cassandra.CassandraRepositoriesAutoConfiguration
org.springframework.boot.data.cassandra.autoconfigure.CassandraDataAutoConfiguration
org.springframework.boot.data.cassandra.autoconfigure.CassandraReactiveDataAutoConfiguration
org.springframework.boot.data.cassandra.autoconfigure.CassandraReactiveRepositoriesAutoConfiguration
org.springframework.boot.data.cassandra.autoconfigure.CassandraRepositoriesAutoConfiguration
org.springframework.boot.autoconfigure.ssl.SslAutoConfiguration
optional:org.springframework.boot.testcontainers.service.connection.ServiceConnectionAutoConfiguration