-
Notifications
You must be signed in to change notification settings - Fork 100
Upgrade to Spring Boot 3.5.8 #680
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
30ada17
dependencies: move up to Spring Boot/SDR 3.5.8
bsbodden 1005afe
docs: add migration guide for Spring Boot 3.5.x and Jedis 6.0.0
bsbodden 8f2065a
release: Releasing version 1.1.0
bsbodden 7fa17e1
refactor: replace deprecated QueryMethodEvaluationContextProvider witβ¦
bsbodden File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,114 @@ | ||
| = Migration Guide | ||
| :navtitle: Migration Guide | ||
|
|
||
| This guide helps you migrate between major versions of Redis OM Spring. | ||
|
|
||
| == Upgrading to 1.1.0 (Spring Boot 3.5.x) | ||
|
|
||
| Redis OM Spring 1.1.0 introduces support for Spring Boot 3.5.x and includes important dependency upgrades. | ||
|
|
||
| === Dependency Changes | ||
|
|
||
| [cols="1,1,1"] | ||
| |=== | ||
| |Dependency |Previous Version |New Version | ||
|
|
||
| |Spring Boot | ||
| |3.4.x | ||
| |3.5.8 | ||
|
|
||
| |Spring Data Redis | ||
| |3.4.x | ||
| |3.5.6 | ||
|
|
||
| |Jedis | ||
| |5.2.0 | ||
| |6.0.0 | ||
| |=== | ||
|
|
||
| === Breaking Changes | ||
|
|
||
| ==== Jedis 6.0.0 Query Escaping | ||
|
|
||
| **Impact:** Users writing custom RediSearch queries using Jedis directly. | ||
|
|
||
| Jedis 6.0.0 changed how it handles query string escaping for RediSearch queries. Multi-word search terms must now use double quotes (`"`) instead of single quotes (`'`). | ||
|
|
||
| **Before (Jedis 5.2.0):** | ||
| [source,java] | ||
| ---- | ||
| SearchOperations<String> ops = modulesOperations.opsForSearch("myIndex"); | ||
| SearchResult result = ops.search(new Query("@title:'hello world'")); | ||
| ---- | ||
|
|
||
| **After (Jedis 6.0.0):** | ||
| [source,java] | ||
| ---- | ||
| SearchOperations<String> ops = modulesOperations.opsForSearch("myIndex"); | ||
| SearchResult result = ops.search(new Query("@title:\"hello world\"")); | ||
| ---- | ||
|
|
||
| **Who is affected:** | ||
|
|
||
| * Users implementing custom repository methods that construct `Query` objects with Jedis | ||
| * Users directly using `SearchOperations` with string-based queries containing spaces | ||
|
|
||
| **Who is NOT affected:** | ||
|
|
||
| * Users only using Redis OM Spring's built-in repository query methods | ||
| * Users using Entity Streams API | ||
| * Users using `@Query` annotations (these are handled internally by Redis OM Spring) | ||
|
|
||
| === Migration Steps | ||
|
|
||
| . Update your `pom.xml` or `build.gradle` to use Redis OM Spring 1.1.0 | ||
| . If you have custom repository implementations using Jedis `Query` objects: | ||
| .. Review all custom query strings | ||
| .. Replace single quotes with double quotes around multi-word search terms | ||
| .. Test your custom queries thoroughly | ||
|
|
||
| === Example Migration | ||
|
|
||
| Here's a complete example of migrating a custom repository method: | ||
|
|
||
| .Before (1.0.x) | ||
| [source,java] | ||
| ---- | ||
| @Override | ||
| public Optional<MyEntity> findByTitle(String title) { | ||
| SearchOperations<String> ops = modulesOperations.opsForSearch(MyEntity.class.getName() + "Idx"); | ||
| SearchResult result = ops.search(new Query("@title:'" + title + "'")); // <1> | ||
| if (result.getTotalResults() > 0) { | ||
| Document doc = result.getDocuments().get(0); | ||
| return Optional.of(ObjectUtils.documentToEntity(doc, MyEntity.class, converter)); | ||
| } | ||
| return Optional.empty(); | ||
| } | ||
| ---- | ||
| <1> Single quotes around the title value | ||
|
|
||
| .After (1.1.0) | ||
| [source,java] | ||
| ---- | ||
| @Override | ||
| public Optional<MyEntity> findByTitle(String title) { | ||
| SearchOperations<String> ops = modulesOperations.opsForSearch(MyEntity.class.getName() + "Idx"); | ||
| SearchResult result = ops.search(new Query("@title:\"" + title + "\"")); // <1> | ||
| if (result.getTotalResults() > 0) { | ||
| Document doc = result.getDocuments().get(0); | ||
| return Optional.of(ObjectUtils.documentToEntity(doc, MyEntity.class, converter)); | ||
| } | ||
| return Optional.empty(); | ||
| } | ||
| ---- | ||
| <1> Double quotes around the title value | ||
|
|
||
| === Testing Your Migration | ||
|
|
||
| After upgrading, ensure you test: | ||
|
|
||
| . All custom repository methods that use Jedis `Query` objects | ||
| . Any direct usage of `SearchOperations` | ||
| . Integration tests with multi-word search terms | ||
|
|
||
| The Redis OM Spring test suite includes comprehensive tests for query escaping. Refer to the test examples in the repository for best practices. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The AsciiDoc table definition is missing the
options="header"attribute, which is needed to properly format the first row as a header. This is inconsistent with other tables in the documentation (e.g., version-requirements.adoc line 13).Change from:
[cols="1,1,1"]to:
[cols="1,1,1", options="header"]This will ensure the "Dependency | Previous Version | New Version" row is formatted as a table header.