Skip to content

Migration Guide 3.12

Guillaume Smet edited this page Jun 11, 2024 · 14 revisions

Spring compatibility layer aligned with Spring Boot 3

Key Changes in spring data jpa latest version:

Introduction of New Interfaces: - With spring-data-jpa 3.x, two new interfaces, ListCrudRepository and ListPagingAndSortingRepository, were introduced. These interfaces return List<T> types, unlike the existing PagingAndSortingRepository and CrudRepository, which return Iterable<T>. - The class hierarchy has been modified: PagingAndSortingRepository no longer extends CrudRepository. Instead, JpaRepository now extends both CrudRepository and PagingAndSortingRepository.

Refactoring of spring-data-rest Extension:

  • To accommodate these changes, the extension’s hierarchy was restructured. Rather than maintaining different implementors, a single implementor now checks the repository type and implements the corresponding methods.

  • All logic is consolidated in the RepositoryMethodsImplementor, which implements all repository methods based on the repository type.

  • The SpringDataRestProcessor has been updated to include the new interfaces and now performs registration in a unified method (registerRepositories) instead of using two separate methods.

  • Unification of PropertiesProvider Classes: these classes have been unified to incorporate the new methods from the List***Repository interfaces.

  • Updates to EntityClassHelper: the EntityClassHelper has been relocated and now includes new methods used by RepositoryMethodsImplementor to detect the repository type for implementation.

  • Modifications to Tests: the Paged*Test no longer checks methods inherited from CrudRepos. A new test case, CrudAndPagedResourceTest, has been added for a repository extending both Crud and Paged repositories.

Note: The new List** methods are not specifically exposed via REST, as this is consistent with Spring’s behavior.

Migration guides

Current version


LTS versions


Next version in main


Clone this wiki locally