Skip to content

Commit c644efb

Browse files
committed
Upgrade to Spring Boot 4.0 snapshots.
See #693
1 parent aba2c67 commit c644efb

File tree

129 files changed

+411
-458
lines changed

Some content is hidden

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

129 files changed

+411
-458
lines changed

bom/pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44

55
<groupId>org.springframework.data.examples</groupId>
66
<artifactId>spring-data-examples-bom</artifactId>
7-
<version>1.0.0.BUILD-SNAPSHOT</version>
7+
<version>1.0.0-SNAPSHOT</version>
88

99
<name>Spring Data - Using the BOM for dependency management</name>
1010

1111
<properties>
12-
<spring.version>6.0.0</spring.version>
13-
<spring-data.version>2022.0.0</spring-data.version>
12+
<spring.version>7.0.0-M9</spring.version>
13+
<spring-data.version>2025.1.0-M6</spring-data.version>
1414
</properties>
1515

1616
<dependencyManagement>

cassandra/aot-optimization/pom.xml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<parent>
99
<groupId>org.springframework.data.examples</groupId>
1010
<artifactId>spring-data-cassandra-examples</artifactId>
11-
<version>2.0.0.BUILD-SNAPSHOT</version>
11+
<version>4.0.0-SNAPSHOT</version>
1212
<relativePath>../pom.xml</relativePath>
1313
</parent>
1414

@@ -17,11 +17,6 @@
1717
Repositories.
1818
</description>
1919

20-
<properties>
21-
<spring-data-bom.version>2025.1.0-SNAPSHOT</spring-data-bom.version>
22-
<spring-framework.version>7.0.0-M9</spring-framework.version>
23-
</properties>
24-
2520
<dependencies>
2621

2722
<dependency>

cassandra/example/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<parent>
88
<groupId>org.springframework.data.examples</groupId>
99
<artifactId>spring-data-cassandra-examples</artifactId>
10-
<version>2.0.0.BUILD-SNAPSHOT</version>
10+
<version>4.0.0-SNAPSHOT</version>
1111
<relativePath>../pom.xml</relativePath>
1212
</parent>
1313

cassandra/example/src/main/java/example/springdata/cassandra/auditing/BasicConfiguration.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2020-2021 the original author or authors.
2+
* Copyright 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.
@@ -18,7 +18,7 @@
1818
import java.util.Optional;
1919

2020
import org.springframework.boot.autoconfigure.SpringBootApplication;
21-
import org.springframework.boot.autoconfigure.domain.EntityScan;
21+
import org.springframework.boot.persistence.autoconfigure.EntityScan;
2222
import org.springframework.context.annotation.Bean;
2323
import org.springframework.context.annotation.Configuration;
2424
import org.springframework.data.cassandra.config.EnableCassandraAuditing;

cassandra/example/src/main/java/example/springdata/cassandra/basic/BasicConfiguration.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
/*
2-
* Copyright 2013-2021 the original author or authors.
2+
* Copyright 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.
66
* You may obtain a copy of the License at
77
*
8-
* https://www.apache.org/licenses/LICENSE-2.0
8+
* http://www.apache.org/licenses/LICENSE-2.0
99
*
1010
* Unless required by applicable law or agreed to in writing, software
1111
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -16,7 +16,7 @@
1616
package example.springdata.cassandra.basic;
1717

1818
import org.springframework.boot.autoconfigure.SpringBootApplication;
19-
import org.springframework.boot.autoconfigure.domain.EntityScan;
19+
import org.springframework.boot.persistence.autoconfigure.EntityScan;
2020
import org.springframework.context.annotation.Configuration;
2121

2222
/**

cassandra/example/src/main/java/example/springdata/cassandra/convert/ConverterConfiguration.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
/*
2-
* Copyright 2016-2021 the original author or authors.
2+
* Copyright 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.
66
* You may obtain a copy of the License at
77
*
8-
* https://www.apache.org/licenses/LICENSE-2.0
8+
* http://www.apache.org/licenses/LICENSE-2.0
99
*
1010
* Unless required by applicable law or agreed to in writing, software
1111
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -21,7 +21,7 @@
2121
import java.util.List;
2222

2323
import org.springframework.boot.autoconfigure.SpringBootApplication;
24-
import org.springframework.boot.autoconfigure.domain.EntityScan;
24+
import org.springframework.boot.persistence.autoconfigure.EntityScan;
2525
import org.springframework.context.annotation.Bean;
2626
import org.springframework.context.annotation.Configuration;
2727
import org.springframework.core.convert.converter.Converter;

cassandra/example/src/main/java/example/springdata/cassandra/events/BasicConfiguration.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
/*
2-
* Copyright 2018-2021 the original author or authors.
2+
* Copyright 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.
66
* You may obtain a copy of the License at
77
*
8-
* https://www.apache.org/licenses/LICENSE-2.0
8+
* http://www.apache.org/licenses/LICENSE-2.0
99
*
1010
* Unless required by applicable law or agreed to in writing, software
1111
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -16,7 +16,7 @@
1616
package example.springdata.cassandra.events;
1717

1818
import org.springframework.boot.autoconfigure.SpringBootApplication;
19-
import org.springframework.boot.autoconfigure.domain.EntityScan;
19+
import org.springframework.boot.persistence.autoconfigure.EntityScan;
2020
import org.springframework.context.annotation.Bean;
2121
import org.springframework.context.annotation.Configuration;
2222

cassandra/example/src/main/java/example/springdata/cassandra/optimisticlocking/BasicConfiguration.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2020-2021 the original author or authors.
2+
* Copyright 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.
@@ -16,7 +16,7 @@
1616
package example.springdata.cassandra.optimisticlocking;
1717

1818
import org.springframework.boot.autoconfigure.SpringBootApplication;
19-
import org.springframework.boot.autoconfigure.domain.EntityScan;
19+
import org.springframework.boot.persistence.autoconfigure.EntityScan;
2020
import org.springframework.context.annotation.Configuration;
2121

2222
/**

cassandra/example/src/main/java/example/springdata/cassandra/projection/ProjectionConfiguration.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
/*
2-
* Copyright 2016-2021 the original author or authors.
2+
* Copyright 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.
66
* You may obtain a copy of the License at
77
*
8-
* https://www.apache.org/licenses/LICENSE-2.0
8+
* http://www.apache.org/licenses/LICENSE-2.0
99
*
1010
* Unless required by applicable law or agreed to in writing, software
1111
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -16,7 +16,7 @@
1616
package example.springdata.cassandra.projection;
1717

1818
import org.springframework.boot.autoconfigure.SpringBootApplication;
19-
import org.springframework.boot.autoconfigure.domain.EntityScan;
19+
import org.springframework.boot.persistence.autoconfigure.EntityScan;
2020
import org.springframework.context.annotation.Configuration;
2121

2222
/**

cassandra/example/src/test/java/example/springdata/cassandra/basic/CassandraOperationsIntegrationTests.java

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
/*
2-
* Copyright 2016-2021 the original author or authors.
2+
* Copyright 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.
66
* You may obtain a copy of the License at
77
*
8-
* https://www.apache.org/licenses/LICENSE-2.0
8+
* http://www.apache.org/licenses/LICENSE-2.0
99
*
1010
* Unless required by applicable law or agreed to in writing, software
1111
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -19,10 +19,8 @@
1919

2020
import example.springdata.cassandra.util.CassandraKeyspace;
2121

22-
import java.util.List;
2322
import java.util.Map;
2423
import java.util.concurrent.CountDownLatch;
25-
import java.util.concurrent.TimeUnit;
2624

2725
import org.junit.jupiter.api.BeforeEach;
2826
import org.junit.jupiter.api.Test;
@@ -32,12 +30,10 @@
3230
import org.springframework.data.cassandra.core.AsyncCassandraTemplate;
3331
import org.springframework.data.cassandra.core.CassandraOperations;
3432
import org.springframework.data.cassandra.core.CassandraTemplate;
35-
import org.springframework.util.concurrent.ListenableFuture;
3633

3734
import com.datastax.oss.driver.api.core.CqlSession;
3835
import com.datastax.oss.driver.api.core.cql.Row;
3936
import com.datastax.oss.driver.api.querybuilder.QueryBuilder;
40-
import com.datastax.oss.driver.api.querybuilder.insert.Insert;
4137

4238
/**
4339
* Integration test showing the basic usage of {@link CassandraTemplate}.
@@ -48,12 +44,11 @@
4844
@CassandraKeyspace
4945
class CassandraOperationsIntegrationTests {
5046

51-
5247
@Autowired CqlSession session;
5348
@Autowired CassandraOperations template;
5449

5550
@BeforeEach
56-
void setUp() throws Exception {
51+
void setUp() {
5752
template.getCqlOperations().execute("TRUNCATE users");
5853
}
5954

@@ -121,7 +116,7 @@ void insertAsynchronously() throws InterruptedException {
121116

122117
var future = asyncTemplate.insert(user);
123118

124-
future.whenComplete((it,ex) -> {
119+
future.whenComplete((it, ex) -> {
125120
var loaded = template.selectOneById(it.getId(), User.class);
126121
assertThat(loaded).isEqualTo(it);
127122
});

0 commit comments

Comments
 (0)