diff --git a/settings.gradle b/settings.gradle index 6d7bf694106..8398aae6cc0 100644 --- a/settings.gradle +++ b/settings.gradle @@ -68,6 +68,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" diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/build.gradle b/spring-boot-project/spring-boot-actuator-autoconfigure/build.gradle index e01c3b6521d..5d2feb7d7c2 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/build.gradle +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/build.gradle @@ -36,8 +36,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")) @@ -149,9 +149,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") diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/cassandra/CassandraHealthContributorAutoConfiguration.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/cassandra/CassandraHealthContributorAutoConfiguration.java index df18a18efba..68e2f4bdffd 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/cassandra/CassandraHealthContributorAutoConfiguration.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/cassandra/CassandraHealthContributorAutoConfiguration.java @@ -34,8 +34,9 @@ import org.springframework.context.annotation.Import; * @author Stephane Nicoll * @since 2.1.0 */ -@AutoConfiguration(after = CassandraReactiveHealthContributorAutoConfiguration.class, - afterName = "org.springframework.boot.cassandra.autoconfigure.CassandraAutoConfiguration") +@AutoConfiguration(afterName = { + "org.springframework.boot.actuate.autoconfigure.cassandra.CassandraReactiveHealthContributorAutoConfiguration", + "org.springframework.boot.cassandra.autoconfigure.CassandraAutoConfiguration" }) @ConditionalOnClass(CqlSession.class) @ConditionalOnEnabledHealthIndicator("cassandra") @Import(CassandraDriverConfiguration.class) diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/WebEndpointsAutoConfigurationIntegrationTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/WebEndpointsAutoConfigurationIntegrationTests.java index c2701eeafff..4dc04c7dba0 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/integrationtest/WebEndpointsAutoConfigurationIntegrationTests.java +++ b/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 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; diff --git a/spring-boot-project/spring-boot-actuator/build.gradle b/spring-boot-project/spring-boot-actuator/build.gradle index 7e5a6995b90..30388174572 100644 --- a/spring-boot-project/spring-boot-actuator/build.gradle +++ b/spring-boot-project/spring-boot-actuator/build.gradle @@ -41,6 +41,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")) @@ -53,9 +54,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") @@ -100,9 +98,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") optional("org.springframework.data:spring-data-ldap") diff --git a/spring-boot-project/spring-boot-autoconfigure-all/build.gradle b/spring-boot-project/spring-boot-autoconfigure-all/build.gradle index 7b643047ec9..88ed6d4ff45 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/build.gradle +++ b/spring-boot-project/spring-boot-autoconfigure-all/build.gradle @@ -50,7 +50,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") @@ -60,7 +59,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")) @@ -178,9 +176,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" } diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/spring-boot-project/spring-boot-autoconfigure-all/src/main/resources/META-INF/additional-spring-configuration-metadata.json index d40b908ef37..9c811e7f2b1 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/resources/META-INF/additional-spring-configuration-metadata.json +++ b/spring-boot-project/spring-boot-autoconfigure-all/src/main/resources/META-INF/additional-spring-configuration-metadata.json @@ -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", diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/spring-boot-project/spring-boot-autoconfigure-all/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports index 7865abb8391..7700cdc2aa2 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports +++ b/spring-boot-project/spring-boot-autoconfigure-all/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -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 diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/alt/cassandra/ReactiveCityCassandraRepository.java b/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/alt/cassandra/ReactiveCityCassandraRepository.java deleted file mode 100644 index a4db4bd1cc5..00000000000 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/alt/cassandra/ReactiveCityCassandraRepository.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * 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. - */ - -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 { - -} diff --git a/spring-boot-project/spring-boot-data-cassandra/build.gradle b/spring-boot-project/spring-boot-data-cassandra/build.gradle new file mode 100644 index 00000000000..aa91f61b7a1 --- /dev/null +++ b/spring-boot-project/spring-boot-data-cassandra/build.gradle @@ -0,0 +1,49 @@ +/* + * 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 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" + } + + optional(project(":spring-boot-project:spring-boot-autoconfigure")) + optional("io.projectreactor:reactor-core") + + 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")) + testImplementation(testFixtures(project(":spring-boot-project:spring-boot-autoconfigure"))) + + testRuntimeOnly("ch.qos.logback:logback-classic") +} diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/dockerTest/java/org/springframework/boot/autoconfigure/data/cassandra/CassandraDataAutoConfigurationIntegrationTests.java b/spring-boot-project/spring-boot-data-cassandra/src/dockerTest/java/org/springframework/boot/data/cassandra/autoconfigure/CassandraDataAutoConfigurationIntegrationTests.java similarity index 96% rename from spring-boot-project/spring-boot-autoconfigure-all/src/dockerTest/java/org/springframework/boot/autoconfigure/data/cassandra/CassandraDataAutoConfigurationIntegrationTests.java rename to spring-boot-project/spring-boot-data-cassandra/src/dockerTest/java/org/springframework/boot/data/cassandra/autoconfigure/CassandraDataAutoConfigurationIntegrationTests.java index 87479bd321b..209ce9f3e00 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/dockerTest/java/org/springframework/boot/autoconfigure/data/cassandra/CassandraDataAutoConfigurationIntegrationTests.java +++ b/spring-boot-project/spring-boot-data-cassandra/src/dockerTest/java/org/springframework/boot/data/cassandra/autoconfigure/CassandraDataAutoConfigurationIntegrationTests.java @@ -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; diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/data/cassandra/CassandraDataAutoConfiguration.java b/spring-boot-project/spring-boot-data-cassandra/src/main/java/org/springframework/boot/data/cassandra/autoconfigure/CassandraDataAutoConfiguration.java similarity index 96% rename from spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/data/cassandra/CassandraDataAutoConfiguration.java rename to spring-boot-project/spring-boot-data-cassandra/src/main/java/org/springframework/boot/data/cassandra/autoconfigure/CassandraDataAutoConfiguration.java index 8444eaa949c..3b515d107b2 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/data/cassandra/CassandraDataAutoConfiguration.java +++ b/spring-boot-project/spring-boot-data-cassandra/src/main/java/org/springframework/boot/data/cassandra/autoconfigure/CassandraDataAutoConfiguration.java @@ -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; @@ -29,6 +29,7 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnBean; import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.boot.autoconfigure.domain.EntityScanPackages; +import org.springframework.boot.cassandra.autoconfigure.CassandraAutoConfiguration; import org.springframework.boot.context.properties.bind.Binder; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Lazy; @@ -57,9 +58,9 @@ 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") +@AutoConfiguration(after = CassandraAutoConfiguration.class) @ConditionalOnClass({ CqlSession.class, CassandraAdminOperations.class }) @ConditionalOnBean(CqlSession.class) public class CassandraDataAutoConfiguration { diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/data/cassandra/CassandraReactiveDataAutoConfiguration.java b/spring-boot-project/spring-boot-data-cassandra/src/main/java/org/springframework/boot/data/cassandra/autoconfigure/CassandraReactiveDataAutoConfiguration.java similarity index 97% rename from spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/data/cassandra/CassandraReactiveDataAutoConfiguration.java rename to spring-boot-project/spring-boot-data-cassandra/src/main/java/org/springframework/boot/data/cassandra/autoconfigure/CassandraReactiveDataAutoConfiguration.java index 0817b471613..2588dad516a 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/data/cassandra/CassandraReactiveDataAutoConfiguration.java +++ b/spring-boot-project/spring-boot-data-cassandra/src/main/java/org/springframework/boot/data/cassandra/autoconfigure/CassandraReactiveDataAutoConfiguration.java @@ -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 }) diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/data/cassandra/CassandraReactiveRepositoriesAutoConfiguration.java b/spring-boot-project/spring-boot-data-cassandra/src/main/java/org/springframework/boot/data/cassandra/autoconfigure/CassandraReactiveRepositoriesAutoConfiguration.java similarity index 96% rename from spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/data/cassandra/CassandraReactiveRepositoriesAutoConfiguration.java rename to spring-boot-project/spring-boot-data-cassandra/src/main/java/org/springframework/boot/data/cassandra/autoconfigure/CassandraReactiveRepositoriesAutoConfiguration.java index e119cbc137d..46342622f34 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/data/cassandra/CassandraReactiveRepositoriesAutoConfiguration.java +++ b/spring-boot-project/spring-boot-data-cassandra/src/main/java/org/springframework/boot/data/cassandra/autoconfigure/CassandraReactiveRepositoriesAutoConfiguration.java @@ -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) diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/data/cassandra/CassandraReactiveRepositoriesRegistrar.java b/spring-boot-project/spring-boot-data-cassandra/src/main/java/org/springframework/boot/data/cassandra/autoconfigure/CassandraReactiveRepositoriesRegistrar.java similarity index 96% rename from spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/data/cassandra/CassandraReactiveRepositoriesRegistrar.java rename to spring-boot-project/spring-boot-data-cassandra/src/main/java/org/springframework/boot/data/cassandra/autoconfigure/CassandraReactiveRepositoriesRegistrar.java index 4a0024393d9..8d1c2838654 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/data/cassandra/CassandraReactiveRepositoriesRegistrar.java +++ b/spring-boot-project/spring-boot-data-cassandra/src/main/java/org/springframework/boot/data/cassandra/autoconfigure/CassandraReactiveRepositoriesRegistrar.java @@ -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; diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/data/cassandra/CassandraRepositoriesAutoConfiguration.java b/spring-boot-project/spring-boot-data-cassandra/src/main/java/org/springframework/boot/data/cassandra/autoconfigure/CassandraRepositoriesAutoConfiguration.java similarity index 96% rename from spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/data/cassandra/CassandraRepositoriesAutoConfiguration.java rename to spring-boot-project/spring-boot-data-cassandra/src/main/java/org/springframework/boot/data/cassandra/autoconfigure/CassandraRepositoriesAutoConfiguration.java index 0cedf55f4eb..ca35f5e6c8f 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/data/cassandra/CassandraRepositoriesAutoConfiguration.java +++ b/spring-boot-project/spring-boot-data-cassandra/src/main/java/org/springframework/boot/data/cassandra/autoconfigure/CassandraRepositoriesAutoConfiguration.java @@ -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 diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/data/cassandra/CassandraRepositoriesRegistrar.java b/spring-boot-project/spring-boot-data-cassandra/src/main/java/org/springframework/boot/data/cassandra/autoconfigure/CassandraRepositoriesRegistrar.java similarity index 96% rename from spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/data/cassandra/CassandraRepositoriesRegistrar.java rename to spring-boot-project/spring-boot-data-cassandra/src/main/java/org/springframework/boot/data/cassandra/autoconfigure/CassandraRepositoriesRegistrar.java index 8fa77792b1b..e1c432c0f76 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/data/cassandra/CassandraRepositoriesRegistrar.java +++ b/spring-boot-project/spring-boot-data-cassandra/src/main/java/org/springframework/boot/data/cassandra/autoconfigure/CassandraRepositoriesRegistrar.java @@ -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; diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/data/cassandra/package-info.java b/spring-boot-project/spring-boot-data-cassandra/src/main/java/org/springframework/boot/data/cassandra/autoconfigure/package-info.java similarity index 91% rename from spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/data/cassandra/package-info.java rename to spring-boot-project/spring-boot-data-cassandra/src/main/java/org/springframework/boot/data/cassandra/autoconfigure/package-info.java index 54663a43469..1ae0cce9858 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/data/cassandra/package-info.java +++ b/spring-boot-project/spring-boot-data-cassandra/src/main/java/org/springframework/boot/data/cassandra/autoconfigure/package-info.java @@ -17,4 +17,4 @@ /** * Auto-configuration for Spring Data Cassandra. */ -package org.springframework.boot.autoconfigure.data.cassandra; +package org.springframework.boot.data.cassandra.autoconfigure; diff --git a/spring-boot-project/spring-boot-data-cassandra/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/spring-boot-project/spring-boot-data-cassandra/src/main/resources/META-INF/additional-spring-configuration-metadata.json new file mode 100644 index 00000000000..27367bba9c8 --- /dev/null +++ b/spring-boot-project/spring-boot-data-cassandra/src/main/resources/META-INF/additional-spring-configuration-metadata.json @@ -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" + } + } + ] +} diff --git a/spring-boot-project/spring-boot-data-cassandra/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/spring-boot-project/spring-boot-data-cassandra/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports new file mode 100644 index 00000000000..e2bb647a555 --- /dev/null +++ b/spring-boot-project/spring-boot-data-cassandra/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -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 diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/cassandra/CassandraDataAutoConfigurationTests.java b/spring-boot-project/spring-boot-data-cassandra/src/test/java/org/springframework/boot/data/cassandra/autoconfigure/CassandraDataAutoConfigurationTests.java similarity index 96% rename from spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/cassandra/CassandraDataAutoConfigurationTests.java rename to spring-boot-project/spring-boot-data-cassandra/src/test/java/org/springframework/boot/data/cassandra/autoconfigure/CassandraDataAutoConfigurationTests.java index 2a1be81e4de..a84e4a01128 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/cassandra/CassandraDataAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-data-cassandra/src/test/java/org/springframework/boot/data/cassandra/autoconfigure/CassandraDataAutoConfigurationTests.java @@ -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 { } diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/cassandra/CassandraMockConfiguration.java b/spring-boot-project/spring-boot-data-cassandra/src/test/java/org/springframework/boot/data/cassandra/autoconfigure/CassandraMockConfiguration.java similarity index 96% rename from spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/cassandra/CassandraMockConfiguration.java rename to spring-boot-project/spring-boot-data-cassandra/src/test/java/org/springframework/boot/data/cassandra/autoconfigure/CassandraMockConfiguration.java index 91c8634f2ad..527006581df 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/cassandra/CassandraMockConfiguration.java +++ b/spring-boot-project/spring-boot-data-cassandra/src/test/java/org/springframework/boot/data/cassandra/autoconfigure/CassandraMockConfiguration.java @@ -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; diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/cassandra/CassandraReactiveDataAutoConfigurationTests.java b/spring-boot-project/spring-boot-data-cassandra/src/test/java/org/springframework/boot/data/cassandra/autoconfigure/CassandraReactiveDataAutoConfigurationTests.java similarity index 94% rename from spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/cassandra/CassandraReactiveDataAutoConfigurationTests.java rename to spring-boot-project/spring-boot-data-cassandra/src/test/java/org/springframework/boot/data/cassandra/autoconfigure/CassandraReactiveDataAutoConfigurationTests.java index e38e2aa40ce..588fa03570f 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/cassandra/CassandraReactiveDataAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-data-cassandra/src/test/java/org/springframework/boot/data/cassandra/autoconfigure/CassandraReactiveDataAutoConfigurationTests.java @@ -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 { } diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/cassandra/CassandraReactiveRepositoriesAutoConfigurationTests.java b/spring-boot-project/spring-boot-data-cassandra/src/test/java/org/springframework/boot/data/cassandra/autoconfigure/CassandraReactiveRepositoriesAutoConfigurationTests.java similarity index 88% rename from spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/cassandra/CassandraReactiveRepositoriesAutoConfigurationTests.java rename to spring-boot-project/spring-boot-data-cassandra/src/test/java/org/springframework/boot/data/cassandra/autoconfigure/CassandraReactiveRepositoriesAutoConfigurationTests.java index 2190353e9fb..2bb2a0bb25a 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/cassandra/CassandraReactiveRepositoriesAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-data-cassandra/src/test/java/org/springframework/boot/data/cassandra/autoconfigure/CassandraReactiveRepositoriesAutoConfigurationTests.java @@ -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 { diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/cassandra/CassandraRepositoriesAutoConfigurationTests.java b/spring-boot-project/spring-boot-data-cassandra/src/test/java/org/springframework/boot/data/cassandra/autoconfigure/CassandraRepositoriesAutoConfigurationTests.java similarity index 87% rename from spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/cassandra/CassandraRepositoriesAutoConfigurationTests.java rename to spring-boot-project/spring-boot-data-cassandra/src/test/java/org/springframework/boot/data/cassandra/autoconfigure/CassandraRepositoriesAutoConfigurationTests.java index 6a32f02e443..29f094c499b 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/cassandra/CassandraRepositoriesAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-data-cassandra/src/test/java/org/springframework/boot/data/cassandra/autoconfigure/CassandraRepositoriesAutoConfigurationTests.java @@ -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 { diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/cassandra/city/City.java b/spring-boot-project/spring-boot-data-cassandra/src/test/java/org/springframework/boot/data/cassandra/domain/city/City.java similarity index 96% rename from spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/cassandra/city/City.java rename to spring-boot-project/spring-boot-data-cassandra/src/test/java/org/springframework/boot/data/cassandra/domain/city/City.java index a5566944ec9..69ccf7d3851 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/cassandra/city/City.java +++ b/spring-boot-project/spring-boot-data-cassandra/src/test/java/org/springframework/boot/data/cassandra/domain/city/City.java @@ -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; diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/cassandra/city/CityRepository.java b/spring-boot-project/spring-boot-data-cassandra/src/test/java/org/springframework/boot/data/cassandra/domain/city/CityRepository.java similarity index 91% rename from spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/cassandra/city/CityRepository.java rename to spring-boot-project/spring-boot-data-cassandra/src/test/java/org/springframework/boot/data/cassandra/domain/city/CityRepository.java index 2533ecd3da4..76847b75e83 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/cassandra/city/CityRepository.java +++ b/spring-boot-project/spring-boot-data-cassandra/src/test/java/org/springframework/boot/data/cassandra/domain/city/CityRepository.java @@ -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; diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/cassandra/city/ReactiveCityRepository.java b/spring-boot-project/spring-boot-data-cassandra/src/test/java/org/springframework/boot/data/cassandra/domain/city/ReactiveCityRepository.java similarity index 92% rename from spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/cassandra/city/ReactiveCityRepository.java rename to spring-boot-project/spring-boot-data-cassandra/src/test/java/org/springframework/boot/data/cassandra/domain/city/ReactiveCityRepository.java index 26d3cfbf81f..59a880b345f 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/cassandra/city/ReactiveCityRepository.java +++ b/spring-boot-project/spring-boot-data-cassandra/src/test/java/org/springframework/boot/data/cassandra/domain/city/ReactiveCityRepository.java @@ -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; diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/alt/cassandra/CityCassandraRepository.java b/spring-boot-project/spring-boot-data-cassandra/src/test/java/org/springframework/boot/data/cassandra/domain/empty/EmptyDataPackage.java similarity index 70% rename from spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/alt/cassandra/CityCassandraRepository.java rename to spring-boot-project/spring-boot-data-cassandra/src/test/java/org/springframework/boot/data/cassandra/domain/empty/EmptyDataPackage.java index dc74619bb5c..12e1bcb58e6 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/data/alt/cassandra/CityCassandraRepository.java +++ b/spring-boot-project/spring-boot-data-cassandra/src/test/java/org/springframework/boot/data/cassandra/domain/empty/EmptyDataPackage.java @@ -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 { +public class EmptyDataPackage { } diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index 645e179329d..bd1e0d7b8e9 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -1996,6 +1996,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", diff --git a/spring-boot-project/spring-boot-docs/build.gradle b/spring-boot-project/spring-boot-docs/build.gradle index a5790cc7fe5..cabf910b987 100644 --- a/spring-boot-project/spring-boot-docs/build.gradle +++ b/spring-boot-project/spring-boot-docs/build.gradle @@ -84,6 +84,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")) @@ -137,6 +138,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")) @@ -185,6 +187,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")) @@ -256,7 +259,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") implementation("org.springframework.data:spring-data-envers") { diff --git a/spring-boot-project/spring-boot-starters/spring-boot-starter-data-cassandra-reactive/build.gradle b/spring-boot-project/spring-boot-starters/spring-boot-starter-data-cassandra-reactive/build.gradle index 064f6474d5c..1b9a0cd1853 100644 --- a/spring-boot-project/spring-boot-starters/spring-boot-starter-data-cassandra-reactive/build.gradle +++ b/spring-boot-project/spring-boot-starters/spring-boot-starter-data-cassandra-reactive/build.gradle @@ -22,8 +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-data-cassandra")) api(project(":spring-boot-project:spring-boot-tx")) - api("org.springframework.data:spring-data-cassandra") api("io.projectreactor:reactor-core") } diff --git a/spring-boot-project/spring-boot-starters/spring-boot-starter-data-cassandra/build.gradle b/spring-boot-project/spring-boot-starters/spring-boot-starter-data-cassandra/build.gradle index 2e8ca3cfd54..27f4c4c9786 100644 --- a/spring-boot-project/spring-boot-starters/spring-boot-starter-data-cassandra/build.gradle +++ b/spring-boot-project/spring-boot-starters/spring-boot-starter-data-cassandra/build.gradle @@ -22,7 +22,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") } diff --git a/spring-boot-project/spring-boot-test-autoconfigure/build.gradle b/spring-boot-project/spring-boot-test-autoconfigure/build.gradle index 76df7536afb..9af23982993 100644 --- a/spring-boot-project/spring-boot-test-autoconfigure/build.gradle +++ b/spring-boot-project/spring-boot-test-autoconfigure/build.gradle @@ -53,8 +53,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")) @@ -96,9 +96,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") diff --git a/spring-boot-project/spring-boot-test-autoconfigure/src/main/resources/META-INF/spring/org.springframework.boot.test.autoconfigure.data.cassandra.AutoConfigureDataCassandra.imports b/spring-boot-project/spring-boot-test-autoconfigure/src/main/resources/META-INF/spring/org.springframework.boot.test.autoconfigure.data.cassandra.AutoConfigureDataCassandra.imports index 75e4f227be7..108562156ea 100644 --- a/spring-boot-project/spring-boot-test-autoconfigure/src/main/resources/META-INF/spring/org.springframework.boot.test.autoconfigure.data.cassandra.AutoConfigureDataCassandra.imports +++ b/spring-boot-project/spring-boot-test-autoconfigure/src/main/resources/META-INF/spring/org.springframework.boot.test.autoconfigure.data.cassandra.AutoConfigureDataCassandra.imports @@ -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