-
Notifications
You must be signed in to change notification settings - Fork 89
3.0.0-M2 Improved @ConstructorBinding Detection #166
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
TestCase 1: Initial code:
Transformed code for SpringBoot 3.0.X:
|
I looked at this recipe already and contributed to I was looking at annotations over constructors as well but at the end decided to follow exactly what release note state without doing any further work: Just removed the type annotation from the type annotated with Since I've contributed it to rewrite-spring already perhaps further corrections (if needed) we can make in rewrite-spring directly? (As a side note - I can reanimate the code i had to handle constructors so feel free to assign to me if you like) |
@sanagaraj-pivotal: In this case we have to remove annotation as well |
yes, we can update rewrite-spring recipe directly or add this functionality into our spring-boot-update-30 module and synchronise all changes at the end, as we agreed |
Provided to OpenRewrite: openrewrite/rewrite-spring#204 |
What needs to be done
Implement the required migration
https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.0.0-M2-Release-Notes#improved-constructorbinding-detection
Example code (to discuss)
Ideal translation
TestCase 1
Given: the Spring Boot 2 has Configuration property file annotated with @ConstructorBinding and has only single constructor
Expected: the @ConstructorBinding annotation is removed for SpringBoot 3.0.X (it is not necessary anymore)
Acceptance criterias
Report
Given: class annotated with ...
When: recipe is applied..
Then: ....
Recipe
Given: class annotated with ...
When: recipe is applied..
Then: ....
Initial code:
Transformed code for SpringBoot 3.0.X:
case 2
The text was updated successfully, but these errors were encountered: