Spring DDD
Spring DDD is a Kotlin framework for domain-driven Spring Boot applications. It stores aggregates as events or as JPA entities, dispatches commands and queries, keeps read models up to date from durable topics, and coordinates work across aggregates with sagas. Spring Boot starters bring the parts in, on their own or together; see Starters. The examples throughout use one banking domain.
What you get
- Event sourcing
-
Aggregates stored as an append-only sequence of events, with snapshots and schema evolution.
- JPA aggregates
-
Aggregates stored as JPA entities that publish domain events.
- Messaging
-
Durable, partitioned topics, and consumers that share them across instances.
- Domain events
-
Events published by aggregates, and handlers that react to them.
- CQRS
-
Command and query buses with type-safe gateways.
- Projections
-
Read models kept up to date from topics, in memory, in JPA entities or in a query store.
- Sagas
-
Process managers with deadlines that coordinate work across aggregates.
- Operations
-
Pausing, resuming and rebuilding projections, running on several instances, and observability.
- Testing
-
Aggregate fixtures, waiting for projections, and database cleanup.
Where to start
-
New to Spring DDD: Installation, then the Quick start.
-
Choosing what to add: Starters and Choosing a database.
-
Understanding the read side: Projections.