Develop#2
Merged
Merged
Conversation
…ions, and quick start guide
…tailed Javadoc comments
…for various GUID strategies
…n for service management
…n for service management
…emove PipelineBehaviorType
…sed UsePipelineBehavior class
…tions and usage examples
…e with new methods
…gement and execution
There was a problem hiding this comment.
Pull request overview
This PR expands the Euonia Java codebase with a new async middleware pipeline module and a Spring integration module, alongside core updates for GUID generation and improved documentation across modules.
Changes:
- Added
pipelinemodule withPipeline/RequestResponsePipelineabstractions, default providers, and unit tests. - Added
springmodule to bridgeServiceResolverwith SpringApplicationContext. - Enhanced core GUID support (
GuidType,GuidGenerator,ObjectId.guid(GuidType)) and significantly expanded the root README/module docs.
Reviewed changes
Copilot reviewed 39 out of 39 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| spring/src/main/java/com/euonia/reflection/ServiceResolverConfiguration.java | Registers a Spring ServiceResolver bean backed by the application context. |
| spring/src/main/java/com/euonia/reflection/ApplicationContextServiceResolver.java | Implements ServiceResolver using Spring bean resolution and autowiring. |
| spring/pom.xml | Adds new Spring module with Spring Context + test deps. |
| pom.xml | Adds pipeline and spring as parent modules. |
| pipeline/src/test/java/com/euonia/pipeline/spring/PipelineSpringIntegrationTests.java | Adds (currently disabled) Spring integration test skeleton for pipeline usage. |
| pipeline/src/test/java/com/euonia/pipeline/DefaultRequestResponsePipelineProviderTests.java | Adds unit tests for typed pipeline behaviors and resolver parameter injection. |
| pipeline/src/test/java/com/euonia/pipeline/DefaultPipelineProviderTests.java | Adds unit tests for @PipelineBehaviors and resolver parameter injection. |
| pipeline/src/main/java/com/euonia/pipeline/RequestResponsePipelineDelegate.java | Introduces typed delegate contract for request/response pipelines. |
| pipeline/src/main/java/com/euonia/pipeline/RequestResponsePipelineBehavior.java | Introduces typed behavior contract for request/response pipelines. |
| pipeline/src/main/java/com/euonia/pipeline/RequestResponsePipelineBase.java | Adds base builder/execution implementation for typed pipelines. |
| pipeline/src/main/java/com/euonia/pipeline/RequestResponsePipeline.java | Adds typed pipeline builder/execution interface. |
| pipeline/src/main/java/com/euonia/pipeline/RequestPipelineDelegate.java | Adds typed fire-and-forget delegate contract. |
| pipeline/src/main/java/com/euonia/pipeline/PipelineFactory.java | Introduces factory abstraction for creating pipeline instances. |
| pipeline/src/main/java/com/euonia/pipeline/PipelineDelegate.java | Introduces pipeline delegate contract. |
| pipeline/src/main/java/com/euonia/pipeline/PipelineBehaviors.java | Adds annotation for context-driven behavior auto-discovery. |
| pipeline/src/main/java/com/euonia/pipeline/PipelineBehavior.java | Adds behavior interface for fire-and-forget pipelines. |
| pipeline/src/main/java/com/euonia/pipeline/PipelineBase.java | Adds base builder/execution implementation for pipelines. |
| pipeline/src/main/java/com/euonia/pipeline/Pipeline.java | Adds pipeline builder/execution interface with Javadoc. |
| pipeline/src/main/java/com/euonia/pipeline/DefaultRequestResponsePipelineProvider.java | Implements typed pipeline behavior resolution and reflective handler invocation. |
| pipeline/src/main/java/com/euonia/pipeline/DefaultPipelineProvider.java | Implements pipeline behavior resolution and reflective handler invocation. |
| pipeline/src/main/java/com/euonia/pipeline/DefaultPipelineFactory.java | Implements PipelineFactory using ServiceResolver. |
| pipeline/README.zh.md | Adds Chinese documentation for the pipeline module. |
| pipeline/README.md | Adds English documentation for the pipeline module. |
| pipeline/pom.xml | Adds new pipeline module with core dependency + test deps. |
| README.md | Expands root documentation with module overview, concepts, and examples. |
| domain/src/main/java/com/euonia/domain/event/ApplicationEventBase.java | Adds Javadoc to application event base type. |
| domain/src/main/java/com/euonia/domain/event/ApplicationEvent.java | Adds Javadoc to application event marker interface. |
| domain/src/main/java/com/euonia/domain/Entity.java | Adds Javadoc to Entity interface. |
| domain/pom.xml | Adds module <name>. |
| core/src/test/java/com/euonia/reflection/DelegateServiceResolverTest.java | Adds tests for DelegateServiceResolver. |
| core/src/test/java/com/euonia/core/ObjectIdTest.java | Adds test for new typed GUID generation strategy. |
| core/src/test/java/com/euonia/core/GuidGeneratorTest.java | Adds tests for GUID generation modes and timestamp embedding. |
| core/src/main/java/com/euonia/reflection/TypeHelper.java | Refines imports/formatting and makes helper methods publicly reusable. |
| core/src/main/java/com/euonia/reflection/SimpleServiceResolver.java | Adds simple map-backed ServiceResolver implementation. |
| core/src/main/java/com/euonia/reflection/ServiceResolver.java | Introduces service resolution abstraction used by pipeline + Spring integration. |
| core/src/main/java/com/euonia/reflection/DelegateServiceResolver.java | Adds function-backed ServiceResolver implementation. |
| core/src/main/java/com/euonia/core/ObjectId.java | Extends GUID generation to accept a GuidType strategy. |
| core/src/main/java/com/euonia/core/GuidType.java | Introduces enum describing GUID generation modes. |
| core/src/main/java/com/euonia/core/GuidGenerator.java | Implements GUID generation compatible with .NET-style sequential GUID layouts. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+51
to
+55
| | `RequestResponsePipeline<TRequest, TResponse>` | Builder for typed request/response pipelines | | ||
| | `RequestResponsePipelineBase<TRequest, TResponse>` | Abstract implementation | | ||
| | `RequestResponsePipelineDelegate<TRequest, TResponse>` | `CompletionStage<TResponse> invoke(TRequest)` | | ||
| | `RequestResponsePipelineBehavior<TRequest, TResponse>` | `CompletionStage<TResponse> handleAsync(TRequest, PipelineDelegate)` | | ||
| | `RequestPipelineDelegate<TRequest>` | Fire-and-forget variant: `CompletionStage<Void> invoke(TRequest)` | |
Comment on lines
+50
to
+54
| | `RequestResponsePipeline<TRequest, TResponse>` | 类型化请求/响应管道的构建器 | | ||
| | `RequestResponsePipelineBase<TRequest, TResponse>` | 抽象实现 | | ||
| | `RequestResponsePipelineDelegate<TRequest, TResponse>` | `CompletionStage<TResponse> invoke(TRequest)` | | ||
| | `RequestResponsePipelineBehavior<TRequest, TResponse>` | `CompletionStage<TResponse> handleAsync(TRequest, PipelineDelegate)` | | ||
| | `RequestPipelineDelegate<TRequest>` | 即发即忘变体:`CompletionStage<Void> invoke(TRequest)` | |
Comment on lines
+226
to
+233
| Pipeline pipeline = resolver.create() // via PipelineFactory | ||
| .use(AuthenticationBehavior.class) | ||
| .use(AuthorizationBehavior.class) | ||
| .use(ValidationBehavior.class, 0) // insert at specific index | ||
| .use((ctx, next) -> next.invoke(ctx)) | ||
| .build(); // freezes the pipeline, clears component list | ||
|
|
||
| pipeline.invoke(context).toCompletableFuture().join(); |
Comment on lines
+225
to
+232
| Pipeline pipeline = resolver.create() // 通过 PipelineFactory | ||
| .use(AuthenticationBehavior.class) | ||
| .use(AuthorizationBehavior.class) | ||
| .use(ValidationBehavior.class, 0) // 插入到指定索引位置 | ||
| .use((ctx, next) -> next.invoke(ctx)) | ||
| .build(); // 冻结管道,清空组件列表 | ||
|
|
||
| pipeline.invoke(context).toCompletableFuture().join(); |
Comment on lines
+1
to
+5
| /* | ||
| package com.euonia.pipeline.spring; | ||
|
|
||
| import java.util.concurrent.CompletionStage; | ||
|
|
Comment on lines
+29
to
+32
| if (constructorArguments == null || constructorArguments.length == 0) { | ||
| return type.cast(factory.createBean(type)); | ||
| //return type.cast(factory.createBean(type, AutowireCapableBeanFactory.AUTOWIRE_CONSTRUCTOR, false)); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.