Skip to content

Commit 2471c08

Browse files
committed
feat!: ROMS v2.0.0 - migration to Spring Boot 4.0.0 and Spring Data Redis 4.0.0 (#675)
BREAKING CHANGE: This release upgrades to Spring Boot 4.0.0 and Spring Data Redis 4.0.0, introducing breaking changes due to Spring's modularization and API changes. - Fix query parameter handling to skip special parameters (Pageable, Sort) in RedisEnhancedQuery.prepareQuery() to prevent conversion exceptions - Update array serialization in MappingRedisOMConverter to iterate directly through arrays instead of converting to lists, resolving PersistentEntity lookup failures for array types - Add validation to prevent persisting collections containing null elements, maintaining data integrity constraints - Adapt to new package structure where test autoconfiguration classes moved to module-specific packages (org.springframework.boot.<module>.*) - Update RedisAutoConfiguration references to DataRedisAutoConfiguration in new org.springframework.boot.data.redis.autoconfigure package - Update deprecated API usage for Spring Data 4.0 compatibility - Update AutoConfigureMockMvc import from org.springframework.boot.test.autoconfigure.web.servlet to org.springframework.boot.webmvc.test.autoconfigure - Update TestRestTemplate import from org.springframework.boot.test.web.client to org.springframework.boot.resttestclient - Update RedisAutoConfiguration to DataRedisAutoConfiguration across test configuration classes - Add spring-boot-starter-webmvc-test for MockMvc support (roms-documents) - Add spring-boot-resttestclient for TestRestTemplate support (roms-vectorizers, roms-modeling) - Add spring-boot-data-redis for DataRedisAutoConfiguration access (roms-vectorizers, roms-modeling, roms-multi-acl-account) - Fix testcontainers:junit-jupiter version specification (1.20.4) across all demo modules (roms-documents, roms-hashes, roms-permits, roms-vss, roms-vss-movies, roms-amr-entraid) - Exclude DataRedisRepositoriesAutoConfiguration in roms-multi-acl-account to prevent Spring Data Redis repositories from overriding Redis OM Spring repositories in multi-ACL scenarios - Spring Boot: 3.x → 4.0.0 - Spring Data Redis: 3.x → 4.0.0 - Jedis: upgraded to 7.0.0 for compatibility - All 1479+ tests passing - All 10 demo modules building successfully - Full compatibility with Spring Boot 4.0.0 verified
1 parent 669f917 commit 2471c08

File tree

42 files changed

+484
-116
lines changed

Some content is hidden

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

42 files changed

+484
-116
lines changed

README.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -93,12 +93,12 @@ Redis OM Spring has the following version requirements:
9393

9494
| Dependency | Minimum Version | Recommended Version | Notes |
9595
|------------|----------------|-------------------|--------|
96-
| **Spring Boot** | 3.3.x | 3.4.x or 3.5.x | Built with Spring Boot 3.4.5 |
97-
| **Spring Data Redis** | 3.4.1 | 3.4.5 or later | Aligned with Spring Boot version |
98-
| **Spring Framework** | 6.2.x | Latest 6.x | Transitive via Spring Boot |
99-
| **Jedis** | 5.2.0 | 5.2.0 or later | Redis Java client |
100-
| **Java** | 17 | 17 or 21 | Spring Boot 3.x requires Java 17+ |
101-
| **Redis Stack** | 6.2.x | 7.2.x or later | For JSON and Search modules |
96+
| **Spring Boot** | 4.0.0 | 4.0.0 or later | Built with Spring Boot 4.0.0 |
97+
| **Spring Data Redis** | 4.0.0 | 4.0.0 or later | Aligned with Spring Boot version |
98+
| **Spring Framework** | 7.0.x | Latest 7.x | Transitive via Spring Boot |
99+
| **Jedis** | 7.0.0 | 7.0.0 or later | Redis Java client |
100+
| **Java** | 21 | 21 | Spring Boot 4.x requires Java 21+ |
101+
| **Redis Stack** | 7.2.x | 7.2.x or later | For JSON and Search modules |
102102

103103
#### Spring Boot Version Compatibility Policy
104104

@@ -108,11 +108,11 @@ Redis OM Spring follows an **N-2 support policy** for Spring Boot versions:
108108
- We support the current version and two previous minor versions that are still receiving OSS updates
109109
- We upgrade Spring Boot with each Redis OM Spring release
110110

111-
For example, as of Redis OM Spring 1.0.0-RC4:
111+
For example, as of Redis OM Spring 2.0.0:
112112

113-
- **Built with**: Spring Boot 3.4.5
114-
- **Minimum supported**: Spring Boot 3.3.x
115-
- **Recommended**: Spring Boot 3.4.x or 3.5.x
113+
- **Built with**: Spring Boot 4.0.0
114+
- **Minimum supported**: Spring Boot 4.0.0
115+
- **Recommended**: Spring Boot 4.0.0 or later
116116

117117
⚠️ **Note**: Using older Spring Boot versions may work but is not officially tested or supported. For production use, we recommend staying within the supported version range.
118118

@@ -492,7 +492,7 @@ This will unlock powerful AI-driven features for your applications, making data
492492

493493
For Maven, things normally just work, when you run `./mvnw spring-boot:run`. Some users have experienced this not being
494494
the case, in which I recommend to explicitly declaring the `maven-compiler-plugin` in the case below it is paired with
495-
an app created with [`start.spring.io`](https://start.spring.io/) with Spring Boot `v3.3.0` (all other versions can be
495+
an app created with [`start.spring.io`](https://start.spring.io/) with Spring Boot `v4.0.0` (all other versions can be
496496
inherited from the parent poms):
497497

498498
```xml
@@ -505,7 +505,7 @@ inherited from the parent poms):
505505
<path>
506506
<groupId>org.springframework.boot</groupId>
507507
<artifactId>spring-boot-configuration-processor</artifactId>
508-
<version>3.3.0</version>
508+
<version>4.0.0</version>
509509
</path>
510510
<path>
511511
<groupId>org.projectlombok</groupId>
@@ -515,7 +515,7 @@ inherited from the parent poms):
515515
<path>
516516
<groupId>com.redis.om</groupId>
517517
<artifactId>redis-om-spring</artifactId>
518-
<version>1.0.0-RC.1</version>
518+
<version>2.0.0</version>
519519
</path>
520520
</annotationProcessorPaths>
521521
</configuration>

demos/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ dependencies {
7171
testImplementation 'org.assertj:assertj-core'
7272
testImplementation 'org.mockito:mockito-core'
7373
testImplementation "com.redis:testcontainers-redis:${testcontainersRedisVersion}"
74-
testImplementation "org.testcontainers:junit-jupiter"
74+
testImplementation "org.testcontainers:junit-jupiter:1.20.4"
7575

7676
// Optional dependencies used by some demos
7777
implementation 'com.github.javafaker:javafaker:1.0.2'

demos/roms-amr-entraid/build.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ dependencies {
5252

5353
// Test dependencies
5454
testImplementation 'org.springframework.boot:spring-boot-starter-test'
55+
testImplementation "com.redis:testcontainers-redis:${testcontainersRedisVersion}"
56+
testImplementation "org.testcontainers:junit-jupiter:1.20.4"
5557
}
5658

5759
// Use -parameters flag for Spring

demos/roms-documents/build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,9 @@ dependencies {
4747

4848
// Test dependencies
4949
testImplementation 'org.springframework.boot:spring-boot-starter-test'
50+
testImplementation 'org.springframework.boot:spring-boot-starter-webmvc-test'
5051
testImplementation "com.redis:testcontainers-redis:${testcontainersRedisVersion}"
51-
testImplementation "org.testcontainers:junit-jupiter"
52+
testImplementation "org.testcontainers:junit-jupiter:1.20.4"
5253
}
5354

5455
// Use -parameters flag for Spring

demos/roms-documents/src/test/java/com/redis/om/documents/controllers/EventControllerTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
import org.junit.jupiter.api.BeforeEach;
1414
import org.junit.jupiter.api.Test;
1515
import org.springframework.beans.factory.annotation.Autowired;
16-
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
16+
import org.springframework.boot.webmvc.test.autoconfigure.AutoConfigureMockMvc;
1717
import org.springframework.test.web.servlet.MockMvc;
1818
import org.springframework.test.web.servlet.request.MockMvcRequestBuilders;
1919

demos/roms-hashes/build.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ dependencies {
4747

4848
// Test dependencies
4949
testImplementation 'org.springframework.boot:spring-boot-starter-test'
50+
testImplementation "com.redis:testcontainers-redis:${testcontainersRedisVersion}"
51+
testImplementation "org.testcontainers:junit-jupiter:1.20.4"
5052
}
5153

5254
// Use -parameters flag for Spring

demos/roms-modeling/build.gradle

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,10 @@ dependencies {
5353

5454
// Test dependencies
5555
testImplementation 'org.springframework.boot:spring-boot-starter-test'
56+
testImplementation 'org.springframework.boot:spring-boot-resttestclient'
57+
testImplementation 'org.springframework.boot:spring-boot-data-redis'
5658
testImplementation "com.redis:testcontainers-redis:${testcontainersRedisVersion}"
57-
testImplementation "org.testcontainers:junit-jupiter"
59+
testImplementation "org.testcontainers:junit-jupiter:1.20.4"
5860
testImplementation 'org.mockito:mockito-core'
5961
}
6062

demos/roms-modeling/src/test/java/com/foogaro/modeling/config/TestRedisConfiguration.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import org.slf4j.Logger;
55
import org.slf4j.LoggerFactory;
66
import org.springframework.boot.autoconfigure.AutoConfigureAfter;
7-
import org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration;
7+
import org.springframework.boot.data.redis.autoconfigure.DataRedisAutoConfiguration;
88
import org.springframework.boot.test.context.TestConfiguration;
99
import org.springframework.context.annotation.Bean;
1010
import org.springframework.context.annotation.Primary;
@@ -24,7 +24,7 @@
2424

2525
@TestConfiguration
2626
@AutoConfigureAfter(
27-
RedisAutoConfiguration.class
27+
DataRedisAutoConfiguration.class
2828
)
2929
@Testcontainers
3030
@Disabled(

demos/roms-modeling/src/test/java/com/foogaro/modeling/controller/TestTextDataController.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
import org.slf4j.LoggerFactory;
1414
import org.springframework.beans.factory.annotation.Autowired;
1515
import org.springframework.boot.test.context.SpringBootTest;
16-
import org.springframework.boot.test.web.client.TestRestTemplate;
16+
import org.springframework.boot.resttestclient.TestRestTemplate;
1717
import org.springframework.http.HttpStatus;
1818
import org.springframework.http.ResponseEntity;
1919
import org.springframework.test.context.ActiveProfiles;

demos/roms-multi-acl-account/build.gradle

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ repositories {
3131
dependencies {
3232
implementation project(':redis-om-spring')
3333

34+
// Spring Boot Data Redis (for auto-configuration classes in Spring Boot 4.0)
35+
implementation 'org.springframework.boot:spring-boot-starter-data-redis'
36+
implementation 'org.springframework.boot:spring-boot-data-redis'
37+
3438
// Important for RedisOM annotation processing!
3539
annotationProcessor project(':redis-om-spring')
3640
testAnnotationProcessor project(':redis-om-spring')
@@ -44,7 +48,7 @@ dependencies {
4448
// Test dependencies
4549
testImplementation 'org.springframework.boot:spring-boot-starter-test'
4650
testImplementation "com.redis:testcontainers-redis:${testcontainersRedisVersion}"
47-
testImplementation "org.testcontainers:junit-jupiter"
51+
testImplementation "org.testcontainers:junit-jupiter:1.20.4"
4852
}
4953

5054
// Use -parameters flag for Spring

0 commit comments

Comments
 (0)