Skip to content

Develop#4

Merged
Codespilot merged 10 commits into
masterfrom
develop
Jun 9, 2026
Merged

Develop#4
Codespilot merged 10 commits into
masterfrom
develop

Conversation

@Codespilot

Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings June 9, 2026 09:11
@Codespilot Codespilot merged commit 4651e69 into master Jun 9, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR expands the framework’s Spring Boot integration and sample app by wiring OSBA into Spring auto-configuration, adding DDD building blocks (domain events + use case presenter interfaces), and extending the sample with pipeline and user aggregate demos.

Changes:

  • Centralize test tool versions in the uow module POM via parent properties.
  • Add OSBA Spring auto-configuration and ensure the Spring module depends on osba.
  • Extend the sample application with datasource config, controllers, and a richer User aggregate + supporting DDD types.

Reviewed changes

Copilot reviewed 24 out of 24 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
uow/pom.xml Switches JUnit/Surefire versions to parent properties for consistency.
spring/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports Registers OSBA configuration for Spring Boot auto-import.
spring/src/main/java/com/euonia/osba/OsbaConfiguration.java Provides an ObjectFactory Spring bean backed by BusinessObjectFactory.
spring/pom.xml Adds com.euonia:osba dependency to the Spring module.
sample/src/main/resources/application.yaml Adds H2 datasource + JPA + error-inclusion configuration for the sample app.
sample/src/main/java/com/euonia/sample/SampleApplication.java Adjusts sample app bootstrap (currently includes commented pipeline import).
sample/src/main/java/com/euonia/sample/persistent/UserRepository.java Adds a placeholder repository interface used by the sample User aggregate.
sample/src/main/java/com/euonia/sample/domain/event/UserCreatedEvent.java Adds a sample domain event emitted on user creation.
sample/src/main/java/com/euonia/sample/domain/EditableObjectBase.java Introduces a sample aggregate base integrating OSBA + domain events.
sample/src/main/java/com/euonia/sample/domain/aggregate/User.java Expands User into a property/rule/event-driven aggregate.
sample/src/main/java/com/euonia/sample/controller/UserController.java Adds REST endpoints for creating/fetching a User via ObjectFactory.
sample/src/main/java/com/euonia/sample/controller/PipelineDemoController.java Adds a pipeline demo REST endpoint using the pipeline module.
sample/pom.xml Adds dependencies on pipeline, domain-driven-design, spring, and H2.
osba/src/main/java/com/euonia/factory/BusinessObjectFactory.java Replaces bean factory function usage with a ServiceResolver.
ddd/src/main/java/com/euonia/usecase/UseCaseSuccess.java Adds a success output port interface for use cases.
ddd/src/main/java/com/euonia/usecase/UseCasePresenter.java Adds a presenter with Flow-based success/failure subscription support.
ddd/src/main/java/com/euonia/usecase/UseCaseFailure.java Adds a failure output port interface for use cases.
ddd/src/main/java/com/euonia/usecase/UseCase.java Adds a basic UseCase<I,O> interface.
ddd/src/main/java/com/euonia/domain/HasDomainEvents.java Adds a domain-events contract for aggregates.
ddd/src/main/java/com/euonia/domain/Entity.java Adds documentation + provides a default getKeys() implementation.
ddd/src/main/java/com/euonia/domain/AggregateBase.java Enhances aggregate base with domain event storage + handler registration.
ddd/src/main/java/com/euonia/domain/Aggregate.java Adds documentation for aggregate roots.
ddd/src/main/java/com/euonia/application/BaseApplicationService.java Adds a base service resolving dependencies and current user via ServiceResolver.
ddd/src/main/java/com/euonia/application/ApplicationService.java Adds a marker interface for application services.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 1 to +18
spring:
application:
name: sample
datasource:
url: jdbc:h2:mem:linkyoudb;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE
driver-class-name: org.h2.Driver
username: sa
password:
jpa:
hibernate:
ddl-auto: update
show-sql: true
web:
error:
include-exception: true
include-message: always
include-binding-errors: always
include-stacktrace: on-param
Comment on lines +3 to +9
//import com.euonia.pipeline.spring.PipelineConfiguration;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Import;

@SpringBootApplication
//@Import(PipelineConfiguration.class)
Comment on lines +46 to +48
public int getAge() {
return getProperty(age);
}
Comment on lines +21 to +23
@DisplayName("User Name")
@Required(message = "name is valid")
private final PropertyInfo<String> name = registerProperty(String.class, "name");
Comment on lines +90 to +104
public CompletableFuture<Void> executeAsync(RuleContext context) {
return CompletableFuture.runAsync(() -> {

if (!(context.getTarget() instanceof User user)) {
return;
}

var name = user.getName();

if (name == null || name.trim().isEmpty()) {
context.addErrorResult(String.format("%s cannot be empty", getProperty().getFriendlyName()));
} else if (name.length() < 12) {
context.addErrorResult(String.format("%s must be 12 characters", getProperty().getFriendlyName()));
}
});
Comment on lines +21 to +26
@PostMapping()
public ResponseEntity<String> createUser(@RequestBody Map<String, Object> params) {
var user = factory.create(User.class, params.getOrDefault("name", "Default Name"));
user.save(false);
return ResponseEntity.ok("User created with name: " + user.getName());
}
Comment on lines 24 to 29
/**
* Configures the BusinessObjectFactory to use the provided bean factory for object instantiation.
*
* @param beanFactory the bean factory function to use for creating objects
* @param resolver the ServiceResolver to be used for resolving services, including the bean factory
* @return the current instance of BusinessObjectFactory
*/
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.

2 participants