Skip to content
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

Upgrade to Spring Boot 3.2.2, Kotlin 1.9.22, Gradle 8.5 + Etc. #111

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

djkeh
Copy link

@djkeh djkeh commented Feb 1, 2024

I just did what it supposed to be done.
Making an upgrade to Spring Boot 3.2.2 was a lot more than just replacing its version number in build.gradle.kts.
You can check the details in 8345211.
Hope this pr is approved.
Also please check #110.

Thank you.

This upgrade includes
some changes of the test codes
which corresponds to significant changes
that have been made in Spring Boot 3.2.

mybatis project encountered the same issue,
so its pr helped a lot making this upgrade done.
The brief explanations are:

1. As of Spring Framework 6.1, we can't pass the value of `factoryBeanObjectType` as `String` to `BeanDefinition`.
2. `BeanFactory.getBean()` in `BeanFactoryExtensions` has been changed.

Good thing is, the changes above
don't seem to affact the implementations.
All we need to do is to correct the test code.

For the details, please check the references below.

## Reference

* mybatis pr: mybatis/spring#865
* as-is 1: https://github.com/spring-projects/spring-framework/blob/66f4509c2c7a1ad0255ed84f9e5efb340bd0b470/spring-beans/src/main/java/org/springframework/beans/factory/support/FactoryBeanRegistrySupport.java#L74-L83
* to-be 1: https://github.com/spring-projects/spring-framework/blob/00577ed80acfc22104b41d6a631f433a3fa7e6af/spring-beans/src/main/java/org/springframework/beans/factory/support/FactoryBeanRegistrySupport.java#L74-L87
* as-is 2: https://github.com/spring-projects/spring-framework/blob/66f4509c2c7a1ad0255ed84f9e5efb340bd0b470/spring-beans/src/main/kotlin/org/springframework/beans/factory/BeanFactoryExtensions.kt#L28
* to-be 2: https://github.com/spring-projects/spring-framework/blob/00577ed80acfc22104b41d6a631f433a3fa7e6af/spring-beans/src/main/kotlin/org/springframework/beans/factory/BeanFactoryExtensions.kt#L29-L30
This commit deals with:

* Unnecessary import and redundant dependency
* More kotlin-like code style
* Refactoring advice from Intellij 2023.3.3
* More accurate KDoc expression
* Simplifying duplicate message
@djkeh
Copy link
Author

djkeh commented Feb 26, 2024

As we are talking about #112 I suggest we go for this pr first, if it needs more time for consideration. This change is safer, smaller, easier to understand, indeed necessary and will eventually help the migration pr #112.

@djkeh
Copy link
Author

djkeh commented Feb 26, 2024

If this is merged, I'll solve conflicts that are expected to happen on #112 with responsibility.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant