Closed timtebeek closed 11 months ago
We are still using Java 11. Text blocks will not work.
We are still using Java 11. Text blocks will not work.
In that case you're better off first looking at https://github.com/bgjug/jprime/pull/238, as Spring Boot 3 requires Java 17.
Here are instructions if you would want to first, and separately, like to upgrade to Java 17: https://docs.openrewrite.org/running-recipes/popular-recipe-guides/migrate-to-java-17 https://docs.openrewrite.org/recipes/java/migrate/upgradetojava17
mvn -U org.openrewrite.maven:rewrite-maven-plugin:run \
-Drewrite.recipeArtifactCoordinates=org.openrewrite.recipe:rewrite-migrate-java:RELEASE \
-Drewrite.activeRecipes=org.openrewrite.java.migrate.UpgradeToJava17
With OSS support for Spring Boot 2.7 expiring a month from now, it might be good to reconsider a move to Spring Boot 3.1 & Java 17.
Seeing the conflicts in this PR I think it's best to close this one; it was created in a mostly automated fashion; here's a quick guide if you're looking to migrate still.
You will want to run the Migrate Spring Boot 3.1 recipe, which runs you through all the steps of migrating to Spring Boot 3.1, no matter what version you're coming from.
If you'd rather migrate in steps, you can also run recipes individually. This can be helpful if you'd like to review and build confidence in the changes, or need to troubleshoot a particular aspect.
As you can see in the Migrate Spring Boot 3.1 recipe, that first takes you to Spring Boot 3.0, which first takes you to Spring Boot 2.7, which first takes you to Spring Boot 2.6, ... You can run any of these intermediate recipes, to pick up the changes up to that point.
You can also pick out specific migrations, for as much as you aren't up-to-date already, such as
After you've migrated to Spring Boot 3.1, you might want to consider some of the following best practices:
You might even want to run some of these recipes periodically, to keep your projects up-to-date continuously.
Here's a number of links that might be helpful in case you encounter edge cases not yet covered:
Thanks for the instructions @timtebeek . I plan to do this migration in the comming weeks.
Via: https://docs.openrewrite.org/recipes/java/spring/boot3/upgradespringboot_3_0