Spring Boot Migrator (Spring Boot)

Introduction

Spring Boot Migrator (SBM) aims to help developers upgrade or migrate to Spring Boot by providing recipes for automated migrations.

Migrate Spring Boot 2.7.x to 3.0.0 (result?)

Download the latest release outside of the project's folder to migrate, eg to the parent folder:

https://github.com/spring-projects-experimental/spring-boot-migrator/releases


Start SBM:

java -jar spring-boot-migrator.jar


Scan your application:

migrator:> scan myapp_docback

- boot-2.7-3.0-dependency-version-update [🤖]

-> Bump spring-boot-starter-parent from 2.7.x to 3.0.0-M3

- boot-2.7-3.0-upgrade-report [🤖]

-> Create a report for Spring Boot Upgrade from 2.7.x to 3.0.0-M3


Generate a report first

myapp_docback:> apply boot-2.7-3.0-upgrade-report

Applying recipe 'boot-2.7-3.0-upgrade-report'

[X] Create report

Action [SpringBoot30UpgradeReport] 'Create report' failed: Cannot invoke "org.openrewrite.java.tree.TypeTree.getType()" because the return value of "org.openrewrite.java.tree.J$MethodDeclaration.getReturnTypeExpression()" is null

Details of the error have been omitted. You can use the stacktrace command to print the full stacktrace.


Run the migration

myapp_docback:> apply boot-2.7-3.0-dependency-version-update

Applying recipe 'boot-2.7-3.0-dependency-version-update'

[ok] Add Spring Boot milestone repository.

[ok] Add Spring Boot milestone plugin repository.

[X] Add Spring Milestone Repository and bump SpringBoot to 3.0.0-M3

Action [OpenRewriteDeclarativeRecipeAdapter] 'Add Spring Milestone Repository and bump SpringBoot to 3.0.0-M3' failed: java.lang.RuntimeException: org.openrewrite.UncaughtVisitorException: org.openrewrite.maven.internal.MavenParsingException: No version provided for dependency javax.xml.bind:jaxb-api

Details of the error have been omitted. You can use the stacktrace command to print the full stacktrace.

Migrate Spring Boot 2.7.x to 3.0.0-M3 (failed)

Although it didn't work as expected, here is the procedure followed.


Download the latest release outside of the project's folder to migrate, eg to the parent folder:

https://github.com/spring-projects-experimental/spring-boot-migrator/releases


Start SBM

java -jar spring-boot-migrator.jarscan


Scan your application

migrator:> scan myapp_docback

- boot-2.7-3.0-dependency-version-update [🤖]

-> Bump spring-boot-starter-parent from 2.7.x to 3.0.0-M3

- boot-2.7-3.0-upgrade-report [🤖]

-> Create a report for Spring Boot Upgrade from 2.7.x to 3.0.0-M3


Generate a report first

myapp_docback:> apply boot-2.7-3.0-upgrade-report

Applying recipe 'boot-2.7-3.0-upgrade-report'

[X] Create report

Action [SpringBoot30UpgradeReport] 'Create report' failed: Cannot invoke "org.openrewrite.java.tree.TypeTree.getType()" because the return value of "org.openrewrite.java.tree.J$MethodDeclaration.getReturnTypeExpression()" is null

Details of the error have been omitted. You can use the stacktrace command to print the full stacktrace.


Run the migration

myapp_docback:> apply boot-2.7-3.0-dependency-version-update

Applying recipe 'boot-2.7-3.0-dependency-version-update'

[ok] Add Spring Boot milestone repository.

[ok] Add Spring Boot milestone plugin repository.

[X] Add Spring Milestone Repository and bump SpringBoot to 3.0.0-M3

Action [OpenRewriteDeclarativeRecipeAdapter] 'Add Spring Milestone Repository and bump SpringBoot to 3.0.0-M3' failed: java.lang.RuntimeException: org.openrewrite.UncaughtVisitorException: org.openrewrite.maven.internal.MavenParsingException: No version provided for dependency javax.xml.bind:jaxb-api

Details of the error have been omitted. You can use the stacktrace command to print the full stacktrace.