-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Fix lazyinit value transfer problem #1316
Conversation
WalkthroughThe recent update in the SOFA Boot Core project enhances bean initialization in Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review Details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- sofa-boot-project/sofa-boot-core/runtime-sofa-boot/src/main/java/com/alipay/sofa/runtime/spring/ServiceBeanFactoryPostProcessor.java (2 hunks)
Additional comments not posted (2)
sofa-boot-project/sofa-boot-core/runtime-sofa-boot/src/main/java/com/alipay/sofa/runtime/spring/ServiceBeanFactoryPostProcessor.java (2)
56-56
: Added import statement forAbstractBeanDefinition
.This import is necessary for the type casting in the modified method
doGenerateSofaReferenceDefinition
.
270-272
: Conditional logic added to setlazyInit
based on the inputbeanDefinition
.The changes correctly implement the intended functionality to ensure that the
lazyInit
property is transferred appropriately, aligning with the PR objectives.
Signed-off-by: Jermaine Hua <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review Details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- sofa-boot-project/sofa-boot-core/runtime-sofa-boot/src/main/java/com/alipay/sofa/runtime/spring/ServiceBeanFactoryPostProcessor.java (3 hunks)
Files skipped from review as they are similar to previous changes (1)
- sofa-boot-project/sofa-boot-core/runtime-sofa-boot/src/main/java/com/alipay/sofa/runtime/spring/ServiceBeanFactoryPostProcessor.java
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1316 +/- ##
============================================
+ Coverage 83.07% 83.13% +0.06%
- Complexity 2959 2962 +3
============================================
Files 337 337
Lines 9707 9709 +2
Branches 1168 1170 +2
============================================
+ Hits 8064 8072 +8
+ Misses 1132 1127 -5
+ Partials 511 510 -1 ☔ View full report in Codecov by Sentry. |
Signed-off-by: Jermaine Hua <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review Details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- sofa-boot-tests/sofa-boot-smoke-tests/sofa-boot-smoke-tests-runtime/src/test/java/com/alipay/sofa/smoke/tests/runtime/spring/SofaBeanLazyInitTests.java (1 hunks)
Additional comments not posted (3)
sofa-boot-tests/sofa-boot-smoke-tests/sofa-boot-smoke-tests-runtime/src/test/java/com/alipay/sofa/smoke/tests/runtime/spring/SofaBeanLazyInitTests.java (3)
49-60
: Test methodcheckSofaServiceBeanDefinitionLazyInitAttribute
correctly checks the lazy initialization attribute of the SofaService bean.
62-71
: Test methodcheckSofaReferenceBeanDefinitionLazyInitAttribute
correctly checks the lazy initialization attribute of the SofaReference bean.
73-90
: Configuration and service implementation classes are correctly defined and used in the test methods.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Summary by CodeRabbit