Skip to content

Commit bd792ea

Browse files
committed
Adapt to changes in Spring Boot 4.0.
See #693
1 parent 649969a commit bd792ea

File tree

96 files changed

+375
-471
lines changed

Some content is hidden

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

96 files changed

+375
-471
lines changed

cassandra/pom.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,12 @@
3131
<artifactId>spring-boot-starter-data-cassandra</artifactId>
3232
</dependency>
3333

34+
<dependency>
35+
<groupId>org.springframework.boot</groupId>
36+
<artifactId>spring-boot-data-cassandra-test</artifactId>
37+
<scope>test</scope>
38+
</dependency>
39+
3440
</dependencies>
3541

3642
</project>

cassandra/reactive/src/test/java/example/springdata/cassandra/auditing/AuditingIntegrationTests.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.
@@ -25,7 +25,7 @@
2525
import org.junit.jupiter.api.Test;
2626

2727
import org.springframework.beans.factory.annotation.Autowired;
28-
import org.springframework.boot.test.autoconfigure.data.cassandra.DataCassandraTest;
28+
import org.springframework.boot.data.cassandra.test.autoconfigure.DataCassandraTest;
2929

3030
/**
3131
* Integration tests showing Reactive Auditing with Cassandra in action.

cassandra/reactive/src/test/java/example/springdata/cassandra/spel/ExpressionIntegrationTests.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.
@@ -28,7 +28,7 @@
2828
import org.junit.jupiter.api.Test;
2929

3030
import org.springframework.beans.factory.annotation.Autowired;
31-
import org.springframework.boot.test.autoconfigure.data.cassandra.DataCassandraTest;
31+
import org.springframework.boot.data.cassandra.test.autoconfigure.DataCassandraTest;
3232

3333
/**
3434
* Integration tests showing the SpEL context extension in action.

cassandra/util/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
<dependency>
2929
<groupId>org.testcontainers</groupId>
30-
<artifactId>cassandra</artifactId>
30+
<artifactId>testcontainers-cassandra</artifactId>
3131
</dependency>
3232

3333
<dependency>

cassandra/util/src/main/java/example/springdata/cassandra/util/CassandraExtension.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2021-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.
@@ -26,7 +26,7 @@
2626

2727
import org.springframework.util.StringUtils;
2828

29-
import org.testcontainers.containers.CassandraContainer;
29+
import org.testcontainers.cassandra.CassandraContainer;
3030

3131
import com.datastax.oss.driver.api.core.CqlSession;
3232

@@ -92,13 +92,13 @@ private static CassandraKeyspace findAnnotation(ExtensionContext context) {
9292
return annotation.orElseThrow(() -> new IllegalStateException("Test class not annotated with @Cassandra"));
9393
}
9494

95-
private CassandraContainer<?> runTestcontainer() {
95+
private CassandraContainer runTestcontainer() {
9696

9797
if (container != null) {
9898
return container;
9999
}
100100

101-
container = new CassandraContainer<>(getCassandraDockerImageName());
101+
container = new CassandraContainer(getCassandraDockerImageName());
102102
container.withReuse(true);
103103

104104
container.start();

couchbase/example/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
</parent>
1111

1212
<artifactId>spring-data-couchbase-example</artifactId>
13-
<name>Basic sample for Spring Data Couchbase</name>
13+
<name>Spring Data Couchbase - Basic sample</name>
1414
<description>Small sample project showing the usage of Spring Data Couchbase.</description>
1515

1616
<dependencies>

elasticsearch/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,13 @@
4545

4646
<dependency>
4747
<groupId>org.testcontainers</groupId>
48-
<artifactId>elasticsearch</artifactId>
48+
<artifactId>testcontainers-elasticsearch</artifactId>
4949
<scope>test</scope>
5050
</dependency>
5151

5252
<dependency>
5353
<groupId>org.testcontainers</groupId>
54-
<artifactId>junit-jupiter</artifactId>
54+
<artifactId>testcontainers-junit-jupiter</artifactId>
5555
<scope>test</scope>
5656
</dependency>
5757

jdbc/basics/src/test/java/example/springdata/jdbc/basics/aggregate/AggregateTests.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
/*
2-
* Copyright 2017-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,13 +21,12 @@
2121

2222
import java.time.Period;
2323
import java.util.Arrays;
24-
import java.util.List;
2524

2625
import org.assertj.core.groups.Tuple;
2726
import org.junit.jupiter.api.Test;
2827

2928
import org.springframework.beans.factory.annotation.Autowired;
30-
import org.springframework.boot.test.autoconfigure.data.jdbc.AutoConfigureDataJdbc;
29+
import org.springframework.boot.data.jdbc.test.autoconfigure.AutoConfigureDataJdbc;
3130
import org.springframework.boot.test.context.SpringBootTest;
3231
import org.springframework.test.annotation.DirtiesContext;
3332

jdbc/basics/src/test/java/example/springdata/jdbc/basics/simpleentity/SimpleEntityTests.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
/*
2-
* Copyright 2017-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,
@@ -23,14 +23,14 @@
2323
import org.junit.jupiter.api.Test;
2424

2525
import org.springframework.beans.factory.annotation.Autowired;
26-
import org.springframework.boot.test.autoconfigure.jdbc.AutoConfigureJdbc;
26+
import org.springframework.boot.jdbc.test.autoconfigure.AutoConfigureJdbc;
2727
import org.springframework.boot.test.context.SpringBootTest;
2828

2929
/**
3030
* Demonstrates simple CRUD operations with a simple entity without any references.
3131
*
3232
* @author Jens Schauder
33-
* @author Divya Srivastava
33+
* @author Divya Srivastava
3434
*/
3535
@SpringBootTest(classes = CategoryConfiguration.class)
3636
@AutoConfigureJdbc

jdbc/composite-ids/src/test/java/example/springdata/jdbc/compositeid/EmployeeTests.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
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,
@@ -15,13 +15,14 @@
1515
*/
1616
package example.springdata.jdbc.compositeid;
1717

18+
import static org.assertj.core.api.Assertions.*;
19+
1820
import org.junit.jupiter.api.Test;
21+
1922
import org.springframework.beans.factory.annotation.Autowired;
20-
import org.springframework.boot.test.autoconfigure.data.jdbc.AutoConfigureDataJdbc;
23+
import org.springframework.boot.data.jdbc.test.autoconfigure.AutoConfigureDataJdbc;
2124
import org.springframework.boot.test.context.SpringBootTest;
2225

23-
import static org.assertj.core.api.Assertions.*;
24-
2526
/**
2627
* Test demonstrating the use of composite ids.
2728
*

0 commit comments

Comments
 (0)