-
Notifications
You must be signed in to change notification settings - Fork 31
<feature> 服务模型 #80
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
<feature> 服务模型 #80
Conversation
…e_cache # Conflicts: # arklet-core/src/test/java/com/alipay/sofa/koupleless/arklet/core/health/custom/model/CustomBiz.java
WalkthroughThe updates bring new service component registration and management features to 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 (14)
- koupleless-common/pom.xml (1 hunks)
- koupleless-common/src/main/java/com/alipay/sofa/koupleless/common/BizRuntimeContext.java (4 hunks)
- koupleless-common/src/main/java/com/alipay/sofa/koupleless/common/exception/ErrorCodes.java (1 hunks)
- koupleless-common/src/main/java/com/alipay/sofa/koupleless/common/service/AbstractComponent.java (1 hunks)
- koupleless-common/src/main/java/com/alipay/sofa/koupleless/common/service/AbstractReferenceComponent.java (1 hunks)
- koupleless-common/src/main/java/com/alipay/sofa/koupleless/common/service/AbstractServiceComponent.java (1 hunks)
- koupleless-common/src/main/java/com/alipay/sofa/koupleless/common/service/BeanRegistry.java (1 hunks)
- koupleless-common/src/main/java/com/alipay/sofa/koupleless/common/service/ComponentRegistry.java (1 hunks)
- koupleless-common/src/main/java/com/alipay/sofa/koupleless/common/service/ServiceState.java (1 hunks)
- koupleless-common/src/test/java/com/alipay/sofa/koupleless/common/BizRuntimeContextTest.java (1 hunks)
- koupleless-common/src/test/java/com/alipay/sofa/koupleless/common/model/MockReferenceComponent.java (1 hunks)
- koupleless-common/src/test/java/com/alipay/sofa/koupleless/common/model/MockServiceComponent.java (1 hunks)
- koupleless-ext/koupleless-build-plugin/koupleless-base-build-plugin/src/main/resources/adapter-mapping.yaml (1 hunks)
- pom.xml (1 hunks)
Files skipped from review due to trivial changes (2)
- koupleless-common/pom.xml
- pom.xml
Additional comments not posted (17)
koupleless-common/src/main/java/com/alipay/sofa/koupleless/common/service/AbstractReferenceComponent.java (1)
23-28: The implementation ofAbstractReferenceComponentcorrectly extendsAbstractComponentand passes parameters to the superclass constructor.koupleless-common/src/test/java/com/alipay/sofa/koupleless/common/model/MockReferenceComponent.java (1)
26-31: TheMockReferenceComponentclass is well implemented for testing purposes with the@Builderannotation enhancing object creation.koupleless-common/src/main/java/com/alipay/sofa/koupleless/common/service/AbstractServiceComponent.java (1)
26-36: TheAbstractServiceComponentclass is correctly implemented, with proper use of Lombok annotations for theserviceStatefield to manage its accessibility.koupleless-common/src/test/java/com/alipay/sofa/koupleless/common/model/MockServiceComponent.java (1)
28-34: TheMockServiceComponentclass is well implemented for testing purposes, using the@Builderannotation effectively for simplified object creation.koupleless-common/src/main/java/com/alipay/sofa/koupleless/common/service/ComponentRegistry.java (1)
25-44: TheComponentRegistryinterface is well designed, providing a flexible and clear API for component management with appropriate generic methods.koupleless-common/src/main/java/com/alipay/sofa/koupleless/common/service/ServiceState.java (1)
23-48: TheServiceStateenum is well implemented, providing robust methods for state management and conversion from strings.koupleless-common/src/main/java/com/alipay/sofa/koupleless/common/service/BeanRegistry.java (1)
28-50: TheBeanRegistryclass is correctly implemented, providing a thread-safe and efficient way to manage beans with appropriate methods for registration, retrieval, and cleanup.koupleless-common/src/main/java/com/alipay/sofa/koupleless/common/exception/ErrorCodes.java (1)
54-62: The new error codesE200001andE200002are well defined and appropriately documented, enhancing the error management capabilities of the service.koupleless-common/src/main/java/com/alipay/sofa/koupleless/common/service/AbstractComponent.java (3)
28-37: Properties are well-defined and appropriately encapsulated.
39-47: Constructor correctly initializes all properties.
49-51: MethodsetBizRuntimeContextis correctly implemented.koupleless-common/src/test/java/com/alipay/sofa/koupleless/common/BizRuntimeContextTest.java (2)
32-40: Test methodtestServicecorrectly tests service registration and unregistration.
42-50: Test methodtestReferencecorrectly tests reference registration and unregistration.koupleless-ext/koupleless-build-plugin/koupleless-base-build-plugin/src/main/resources/adapter-mapping.yaml (1)
55-78: New adapter mappings forspring-boot-autoconfigureare correctly formatted and cover the specified versions.koupleless-common/src/main/java/com/alipay/sofa/koupleless/common/BizRuntimeContext.java (3)
42-53: New fields inBizRuntimeContextare well-defined and correctly initialized.
164-213: Methods for service and reference management inBizRuntimeContextare correctly implemented and include proper error handling.
Line range hint
40-213: Overall implementation ofBizRuntimeContextasComponentRegistryis consistent and well-structured.
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 (3)
- koupleless-common/src/main/java/com/alipay/sofa/koupleless/common/BizRuntimeContext.java (4 hunks)
- koupleless-common/src/main/java/com/alipay/sofa/koupleless/common/service/ComponentRegistry.java (1 hunks)
- koupleless-common/src/test/java/com/alipay/sofa/koupleless/common/BizRuntimeContextTest.java (1 hunks)
Files skipped from review as they are similar to previous changes (3)
- koupleless-common/src/main/java/com/alipay/sofa/koupleless/common/BizRuntimeContext.java
- koupleless-common/src/main/java/com/alipay/sofa/koupleless/common/service/ComponentRegistry.java
- koupleless-common/src/test/java/com/alipay/sofa/koupleless/common/BizRuntimeContextTest.java
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 (2)
- koupleless-common/src/main/java/com/alipay/sofa/koupleless/common/BizRuntimeContext.java (3 hunks)
- koupleless-ext/koupleless-build-plugin/koupleless-base-build-plugin/src/main/resources/adapter-mapping.yaml (1 hunks)
Files skipped from review as they are similar to previous changes (2)
- koupleless-common/src/main/java/com/alipay/sofa/koupleless/common/BizRuntimeContext.java
- koupleless-ext/koupleless-build-plugin/koupleless-base-build-plugin/src/main/resources/adapter-mapping.yaml
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #80 +/- ##
============================================
- Coverage 79.92% 79.09% -0.83%
Complexity 156 156
============================================
Files 61 65 +4
Lines 1654 1732 +78
Branches 183 192 +9
============================================
+ Hits 1322 1370 +48
- Misses 242 270 +28
- Partials 90 92 +2 ☔ View full report in Codecov by Sentry. |
koupleless-common/src/main/java/com/alipay/sofa/koupleless/common/BizRuntimeContext.java
Outdated
Show resolved
Hide resolved
lvjing2
left a comment
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
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 (2)
- koupleless-common/src/main/java/com/alipay/sofa/koupleless/common/BizRuntimeContext.java (3 hunks)
- pom.xml (1 hunks)
Files skipped from review as they are similar to previous changes (2)
- koupleless-common/src/main/java/com/alipay/sofa/koupleless/common/BizRuntimeContext.java
- pom.xml
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)
- koupleless-common/src/main/java/com/alipay/sofa/koupleless/common/BizRuntimeContext.java (3 hunks)
Files skipped from review as they are similar to previous changes (1)
- koupleless-common/src/main/java/com/alipay/sofa/koupleless/common/BizRuntimeContext.java
lvjing2
left a comment
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
New Features
Service not foundandProtocol not registered.spring-boot-autoconfigure.Enhancements
BizRuntimeContextto support component registry functionalities.Bug Fixes
spring-boot-starter-loggingmatcher.Tests