Choosing your starters
Pick exactly the starters you need — each wires the right libraries automatically; multiple storage techs can run in parallel.
Full-stack bundles
Use one of these when you want event sourcing and CQRS together out of the box.
|
The two bundles are not mutually exclusive — put both on the classpath to mix |
spring-ddd-starter-jdbc-
Event sourcing + CQRS + JSON
@JsonProjectionread models over plain JDBC. No Hibernate dependency. This is the recommended starting point for new services. spring-ddd-starter-jpa-
Event sourcing + CQRS + JPA
@JpaProjectionread models via Hibernate. Use when you need a full JPA entity model for your read side.
À-la-carte starters
Add only what you need. These compose freely with each other and with the full-stack bundles.
spring-ddd-starter-eventsourcing-jdbc-
Event-sourcing persistence only (JDBC). Activate when you need event sourcing without the CQRS stack.
spring-ddd-starter-cqrs-jdbc-
The CQRS command and query bus with JSON
@JsonProjectionread models persisted over plain JDBC. spring-ddd-starter-cqrs-jpa-
The CQRS command and query bus with JPA
@JpaProjectionread models via Hibernate. spring-ddd-starter-saga-jdbc-
Process-manager (saga) support over JDBC. Adds durable saga state and deadline scheduling.
spring-ddd-starter-domain-events-
Async
@DomainEventHandlerdispatch without the ES/CQRS stack. Use when you want decoupled event handlers in a non-event-sourced service.
Actuator add-ons
spring-ddd-starter-eventsourcing-actuator-
/actuator/eventstoreendpoint + event-store health indicator and metrics. spring-ddd-starter-cqrs-actuator-
/actuator/projectionsendpoint + projection health and metrics. spring-ddd-starter-saga-actuator-
/actuator/sagasendpoint + saga health and metrics.
Decision table
| I want to… | Use |
|---|---|
Full ES + CQRS, JSON read models (no Hibernate) |
|
Full ES + CQRS, JPA read models |
|
Event sourcing only |
|
CQRS only, JSON read models |
|
CQRS only, JPA read models |
|
Add process managers to any of the above |
+ |
Async domain-event handlers, no ES/CQRS |
|
Multiple storage techs may run in parallel in a single application.
For example, a service can use spring-ddd-starter-jdbc and still declare JPA entities for other purposes.
|
For event-sourcing depth, see Event-Sourcing. For projection and query details, see CQRS.