Migrate to Spring Data 3.0

MSAL

Migrate applications to Spring Data 3.0. Handles the PagingAndSortingRepository hierarchy change where it no longer extends CrudRepository, and chains prior deprecation fixes from Spring Data 2.7.

org.openrewrite.java.spring.data.UpgradeSpringData_3_0
mod run . --recipe=org.openrewrite.java.spring.data.UpgradeSpringData_3_0

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.

Recipe list

It runs these recipes, in this order.

  1. Migrate to Spring Data JPA 2.7
  2. Add CrudRepository to interfaces extending PagingAndSortingRepository
  3. Change type PersistenceConstructor to PersistenceCreator
  4. Upgrade Gradle or Maven dependency versions org.springframework.data:*:3.0.x