openrewrite / rewrite-spring

OpenRewrite recipes for Spring projects.
Apache License 2.0
253 stars 73 forks source link

Spring Framework 6.0 recipe with migration for Spring `Assert` #522

Closed pativa closed 4 months ago

pativa commented 4 months ago

What's changed?

Added a base recipe for migrating to Spring Framework 6. This is not a complete migration, but can serve as a place to put Spring-related migrations necessary (as opposed to changes related to only Spring Boot).

What's your motivation?

https://github.com/openrewrite/rewrite-spring/issues/521

Anything in particular you'd like reviewers to focus on?

I copied the format from the earlier UpgradeSpringFramework_5_3.

Any additional context

I have tested the changes under MigrateSpringAssert in our internal migration and it seems to work fine. I have taken the literal text added from the Spring class and reformatted them a bit.

Ideally, the message contain variable name but that would be a harder change to write automatically. Usage of this is probably not too common anyway as the functions have been deprecated for a long time.

Checklist