Migrate Spring Data MongoDB to Quarkus Panache MongoDB

MSAL

Migrates Spring Data MongoDB repositories to Quarkus MongoDB with Panache. Converts MongoRepository interfaces to PanacheMongoRepository pattern.

org.openrewrite.quarkus.spring.MigrateSpringDataMongodb
mod run . --recipe=org.openrewrite.quarkus.spring.MigrateSpringDataMongodb

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. Change Gradle or Maven dependency org.springframework.boot:spring-boot-starter-data-mongodb
  2. Convert MongoRepository to PanacheMongoRepository
  3. Change type Document to MongoEntity
  4. Change type MongoTemplate to MongoClient