Merged
Conversation
Spring Data 3.0 changed PagingAndSortingRepository to no longer extend CrudRepository. Interfaces extending only PagingAndSortingRepository lose CRUD methods like save(), findById(), and delete(). This adds MigratePagingAndSortingRepository which detects affected interfaces and adds CrudRepository to their extends clause. It is wired into a new UpgradeSpringData_3_0 declarative recipe that chains UpgradeSpringData_2_7 and bumps spring-data dependency versions. UpgradeSpringData_3_4 now chains UpgradeSpringData_3_0, and UpgradeSpringFramework_6_0 includes UpgradeSpringData_3_0 so both Boot and non-Boot upgrade paths pick it up.
deecd05 to
48d00da
Compare
Check the full type hierarchy when determining if an interface already has CrudRepository methods, rather than only checking direct supertypes. This avoids incorrectly adding CrudRepository when it is already inherited transitively through another interface like JpaRepository.
…0.yml Use ListUtils.concat instead of manual ArrayList construction for adding CrudRepository to implements list. Remove redundant section comment from spring-data-30.yml.
timtebeek
approved these changes
Apr 1, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
MigratePagingAndSortingRepositoryrecipe that detects interfaces extending onlyPagingAndSortingRepository(which no longer extendsCrudRepositoryin Spring Data 3.0) and addsCrudRepositoryto their extends clauseUpgradeSpringData_3_0declarative recipe chainingUpgradeSpringData_2_7, the new migration recipe, and a dependency version bumpUpgradeSpringData_3_0intoUpgradeSpringFramework_6_0so both Boot and non-Boot upgrade paths pick it upUpgradeSpringData_3_4to chainUpgradeSpringData_3_0(was previously unchained)Test plan
MigratePagingAndSortingRepositoryTest— adds CrudRepository when only PagingAndSortingRepository is extended