spring-boot-migrator
spring-boot-migrator copied to clipboard
Spring Boot Migrator (SBM) is a tool for automated code migrations to upgrade or migrate to Spring Boot
= Spring Boot Migrator (SBM)
[quote]
Spring Boot Migrator (SBM) aims to help developers upgrade or migrate to https://spring.io/projects/spring-boot[Spring Boot] by providing recipes for automated migrations.
== How SBM works
Spring Boot Migrator uses and is compatible with https://github.com/openrewrite/rewrite[OpenRewrite,window=_blank], a powerful mass refactoring ecosystem for Java and other source code.
Spring Boot Migrator offers a CLI to run recipes to migrate or upgrade a given application to Spring Boot. For developing new and custom recipes, SBM provides an opinionated API compatible with OpenRewrite recipes and a set of specialized resource representations to simplify recipe development for Spring Boot.
=== Scan application A given codebase is scanned and a set of recipes gets evaluated against the codebase. +
image::images/scan.png[]
=== Apply a recipe The list of applicable recipes is displayed and recipes can be selected from the list to be run against the codebase. + The recipes either apply automated migrations or guide users on their migration journey.
image::images/apply.png[]
== Getting started
- Download the latest release from here: https://github.com/spring-projects-experimental/spring-boot-migrator/releases[Spring Boot Migrator Releases]
- Start the application:
java -jar spring-boot-migrator.jar - In the CLI start by scanning the application
scan <path-to-application> - From the list of applicable recipes select the one you want to apply, +
e.g.:
apply initialize-spring-boot-migration+ Spring Boot Migrator will now apply the migrations defined in the recipe to the codebase. - To get help when using SBM use the
helpcommand
NOTE: When using Windows you must either escape \ or use / as path separator, e.g. C:\\my\\app or C:/my/app
NOTE: SBM requires a JDK 17.
=== Building from source
- Clone the repository
- Change into root dir
- Run
mvn clean install - Find the jar in
applications/spring-shell/spring-boot-migrator.jar
WARNING: Some integration tests use Docker so you'll need Docker to run them. +
You can pass the -DskipTests flag to the mvn command to ignore tests.
== Documentation
- https://spring-projects-experimental.github.io/spring-boot-migrator/user-documentation.html[User documentation,window=_blank]
- https://spring-projects-experimental.github.io/spring-boot-migrator/developer-documentation.html[Developer documentation,window=_blank]
== Contributing
If you have not previously done so, please sign the https://cla.pivotal.io/sign/spring[Contributor License Agreement]. You will be reminded automatically when you submit the pull request.
All contributions are welcome.
Please refer to the link:CONTRIBUTING.adoc[] for more details.
This project requires Java 17.
== License
https://www.apache.org/licenses/LICENSE-2.0[Apache License v2.0]