Skip to content

Commit 9df2ac0

Browse files
snicollwilkinsona
authored andcommitted
Create spring-boot-cassandra module
1 parent daa416c commit 9df2ac0

File tree

56 files changed

+183
-142
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+183
-142
lines changed

settings.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ include "spring-boot-project:spring-boot-artemis"
5050
include "spring-boot-project:spring-boot-autoconfigure"
5151
include "spring-boot-project:spring-boot-autoconfigure-all"
5252
include "spring-boot-project:spring-boot-batch"
53+
include "spring-boot-project:spring-boot-cassandra"
5354
include "spring-boot-project:spring-boot-couchbase"
5455
include "spring-boot-project:spring-boot-data-jpa"
5556
include "spring-boot-project:spring-boot-dependencies"

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ dependencies {
2020
optional(project(":spring-boot-project:spring-boot-activemq"))
2121
optional(project(":spring-boot-project:spring-boot-amqp"))
2222
optional(project(":spring-boot-project:spring-boot-artemis"))
23+
optional(project(":spring-boot-project:spring-boot-cassandra"))
2324
optional(project(":spring-boot-project:spring-boot-couchbase"))
2425
optional(project(":spring-boot-project:spring-boot-data-jpa"))
2526
optional(project(":spring-boot-project:spring-boot-elasticsearch"))

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2022 the original author or authors.
2+
* Copyright 2012-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -23,7 +23,6 @@
2323
import org.springframework.boot.actuate.cassandra.CassandraDriverHealthIndicator;
2424
import org.springframework.boot.autoconfigure.AutoConfiguration;
2525
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
26-
import org.springframework.boot.autoconfigure.cassandra.CassandraAutoConfiguration;
2726
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
2827
import org.springframework.boot.autoconfigure.data.cassandra.CassandraDataAutoConfiguration;
2928
import org.springframework.context.annotation.Import;
@@ -36,8 +35,9 @@
3635
* @author Stephane Nicoll
3736
* @since 2.1.0
3837
*/
39-
@AutoConfiguration(after = { CassandraAutoConfiguration.class, CassandraDataAutoConfiguration.class,
40-
CassandraReactiveHealthContributorAutoConfiguration.class })
38+
@AutoConfiguration(
39+
after = { CassandraDataAutoConfiguration.class, CassandraReactiveHealthContributorAutoConfiguration.class },
40+
afterName = "org.springframework.boot.cassandra.autoconfigure.CassandraAutoConfiguration")
4141
@ConditionalOnClass(CqlSession.class)
4242
@ConditionalOnEnabledHealthIndicator("cassandra")
4343
@Import(CassandraDriverConfiguration.class)

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
import org.springframework.boot.actuate.health.HealthEndpointWebExtension;
2525
import org.springframework.boot.actuate.health.ReactiveHealthEndpointWebExtension;
2626
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
27-
import org.springframework.boot.autoconfigure.cassandra.CassandraAutoConfiguration;
2827
import org.springframework.boot.autoconfigure.data.cassandra.CassandraDataAutoConfiguration;
2928
import org.springframework.boot.autoconfigure.data.elasticsearch.ElasticsearchDataAutoConfiguration;
3029
import org.springframework.boot.autoconfigure.data.mongo.MongoDataAutoConfiguration;
@@ -36,6 +35,7 @@
3635
import org.springframework.boot.autoconfigure.data.rest.RepositoryRestMvcAutoConfiguration;
3736
import org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration;
3837
import org.springframework.boot.autoconfigure.mongo.MongoReactiveAutoConfiguration;
38+
import org.springframework.boot.cassandra.autoconfigure.CassandraAutoConfiguration;
3939
import org.springframework.boot.context.annotation.UserConfigurations;
4040
import org.springframework.boot.flyway.autoconfigure.FlywayAutoConfiguration;
4141
import org.springframework.boot.hazelcast.autoconfigure.HazelcastAutoConfiguration;

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ dependencies {
4343

4444
optional(project(":spring-boot-project:spring-boot-activemq"))
4545
optional(project(":spring-boot-project:spring-boot-artemis"))
46+
optional(project(":spring-boot-project:spring-boot-cassandra"))
4647
optional(project(":spring-boot-project:spring-boot-couchbase"))
4748
optional(project(":spring-boot-project:spring-boot-data-jpa"))
4849
optional(project(":spring-boot-project:spring-boot-elasticsearch"))

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2024 the original author or authors.
2+
* Copyright 2012-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -26,6 +26,7 @@
2626
import org.springframework.beans.factory.config.BeanPostProcessor;
2727
import org.springframework.beans.factory.support.BeanDefinitionRegistry;
2828
import org.springframework.boot.autoconfigure.AutoConfigurations;
29+
import org.springframework.boot.cassandra.autoconfigure.CassandraAutoConfiguration;
2930
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
3031
import org.springframework.boot.testsupport.container.TestImage;
3132
import org.springframework.context.annotation.Bean;

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2024 the original author or authors.
2+
* Copyright 2012-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -37,6 +37,7 @@
3737

3838
import org.springframework.beans.factory.BeanCreationException;
3939
import org.springframework.boot.autoconfigure.AutoConfigurations;
40+
import org.springframework.boot.cassandra.autoconfigure.CassandraAutoConfiguration;
4041
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
4142
import org.springframework.boot.testsupport.container.TestImage;
4243
import org.springframework.util.StreamUtils;

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2024 the original author or authors.
2+
* Copyright 2012-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -26,8 +26,8 @@
2626
import org.springframework.beans.factory.support.BeanDefinitionRegistry;
2727
import org.springframework.boot.autoconfigure.AutoConfigurationPackages;
2828
import org.springframework.boot.autoconfigure.AutoConfigurations;
29-
import org.springframework.boot.autoconfigure.cassandra.CassandraAutoConfiguration;
3029
import org.springframework.boot.autoconfigure.data.cassandra.city.City;
30+
import org.springframework.boot.cassandra.autoconfigure.CassandraAutoConfiguration;
3131
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
3232
import org.springframework.boot.testsupport.container.TestImage;
3333
import org.springframework.context.annotation.Bean;

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
import org.springframework.boot.autoconfigure.AutoConfiguration;
2626
import org.springframework.boot.autoconfigure.AutoConfigurationPackages;
2727
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
28-
import org.springframework.boot.autoconfigure.cassandra.CassandraAutoConfiguration;
2928
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
3029
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
3130
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
@@ -60,7 +59,7 @@
6059
* @author Christoph Strobl
6160
* @since 1.3.0
6261
*/
63-
@AutoConfiguration(after = CassandraAutoConfiguration.class)
62+
@AutoConfiguration(afterName = "org.springframework.boot.cassandra.autoconfigure.CassandraAutoConfiguration")
6463
@ConditionalOnClass({ CqlSession.class, CassandraAdminOperations.class })
6564
@ConditionalOnBean(CqlSession.class)
6665
public class CassandraDataAutoConfiguration {

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

Lines changed: 0 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -13,56 +13,6 @@
1313
"description": "Whether subclass-based (CGLIB) proxies are to be created (true), as opposed to standard Java interface-based proxies (false).",
1414
"defaultValue": true
1515
},
16-
{
17-
"name": "spring.cassandra.compression",
18-
"defaultValue": "none"
19-
},
20-
{
21-
"name": "spring.cassandra.connection.connect-timeout",
22-
"defaultValue": "5s"
23-
},
24-
{
25-
"name": "spring.cassandra.connection.init-query-timeout",
26-
"defaultValue": "5s"
27-
},
28-
{
29-
"name": "spring.cassandra.contact-points",
30-
"defaultValue": [
31-
"127.0.0.1:9042"
32-
]
33-
},
34-
{
35-
"name": "spring.cassandra.controlconnection.timeout",
36-
"defaultValue": "5s"
37-
},
38-
{
39-
"name": "spring.cassandra.pool.heartbeat-interval",
40-
"defaultValue": "30s"
41-
},
42-
{
43-
"name": "spring.cassandra.pool.idle-timeout",
44-
"defaultValue": "5s"
45-
},
46-
{
47-
"name": "spring.cassandra.request.page-size",
48-
"defaultValue": 5000
49-
},
50-
{
51-
"name": "spring.cassandra.request.throttler.type",
52-
"defaultValue": "none"
53-
},
54-
{
55-
"name": "spring.cassandra.request.timeout",
56-
"defaultValue": "2s"
57-
},
58-
{
59-
"name": "spring.cassandra.ssl",
60-
"type": "java.lang.Boolean",
61-
"deprecation": {
62-
"replacement": "spring.cassandra.ssl.enabled",
63-
"level": "error"
64-
}
65-
},
6616
{
6717
"name": "spring.dao.exceptiontranslation.enabled",
6818
"type": "java.lang.Boolean",
@@ -1485,17 +1435,6 @@
14851435
}
14861436
]
14871437
},
1488-
{
1489-
"name": "spring.cassandra.schema-action",
1490-
"providers": [
1491-
{
1492-
"name": "handle-as",
1493-
"parameters": {
1494-
"target": "org.springframework.data.cassandra.config.SchemaAction"
1495-
}
1496-
}
1497-
]
1498-
},
14991438
{
15001439
"name": "spring.data.mongodb.field-naming-strategy",
15011440
"providers": [

0 commit comments

Comments
 (0)