Spring Boot Migrator (SBM)
Spring Boot Migrator (SBM) aims to help developers upgrade or migrate to Spring Boot by providing recipes for automated migrations.
Support and Requirements
Documentation
Spring Boot 3.0 Upgrade - Interactive Web UI
We are working on automated upgrade from Spring Boot 2.7 to Spring Boot 3.0.
Click the image to watch a demo video [2:26]
Try the Spring Boot Upgrade Tool
Note
|
Use JDK 17 |
-
Download the spring-boot-upgrade.jar
-
Run
java -jar --add-opens java.base/sun.nio.ch=ALL-UNNAMED --add-opens java.base/java.io=ALL-UNNAMED spring-boot-upgrade.jar <path-to-application>
If any of your applications is on 2.7 and uses Maven (Gradle is currently not supported), weโd be happy if you could give SBM a try and provide feedback of how it worked out. It is very hard to come up with all the possible setups found in the wild and therefor we need you - the community - to provide feedback to stabilize the recipe.
Thank you!
Contributing
Any contribution is appreciated! If you want to get involved, please have a look at Spring Boot 3 Upgrade Report Contribution Guideline where we provide information related to contributing to the Spring Boot 3 Upgrade. Please donโt hesitate to ask questions and provide feedback.
Find the list of Spring Boot 3 Upgrade related issues labeled as good first issue
here
If you decided you want to work on an issue, leave a comment letting us know that you want to work on it and we go from there.
Thank you!
JEE to Spring Boot Migration
How SBM works
Spring Boot Migrator uses and is compatible with OpenRewrite, 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.
Spring Boot 3.0 Migrator - Java CLI
-
Download the latest release from here: 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
help
command
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.
|
Contributing
If you have not previously done so, please sign the Contributor License Agreement. You will be reminded automatically when you submit the pull request.
All contributions are welcome.
Please refer to the CONTRIBUTING.adoc for more details.
This project requires Java 17.