Modules
Spring DDD ships as focused Gradle modules under the group de.dwittkoetter.
Most applications need only the full-stack bundle spring-ddd-starter-jpa, which bundles all the building-block modules together.
Individual modules are listed here for reference; select them directly only when you need fine-grained control over what is activated.
Add a module as a Gradle dependency using:
implementation("de.dwittkoetter:<artifact>:0.0.1-SNAPSHOT")
Core libraries
| Module | Kind | Purpose |
|---|---|---|
|
library |
Framework meta-annotations and DDD stereotypes ( |
|
library |
The storage-agnostic messaging core: message type annotations ( |
|
library |
JDBC plumbing the framework’s JDBC modules share: writes that commit whatever the pool’s auto-commit setting, the schema-creation setting, and the database clock every lease is judged on. |
|
library |
Relational topic storage, written in the writer’s transaction: the capture topic and its tables, the high-water-mark store and its detector, the partition-count table shared with the event store, and the table compacting topics record their progress in, across the five supported databases. |
|
library |
Relational consumer state, written in the consumer’s transaction: the consumer checkpoint store, the undelivered messages, the partition ownership and membership stores, their tables across the five supported databases, and the check that the transaction manager covers the checkpoint table’s DataSource. |
|
library |
Scalar type conversion: Jackson serialization and Spring type converters for wrapped value objects. |
|
library |
|
Event Sourcing
| Module | Kind | Purpose |
|---|---|---|
|
library |
Event-sourcing core: |
|
library |
JDBC implementations of |
CQRS
| Module | Kind | Purpose |
|---|---|---|
|
library |
Command and query buses, the projection annotations ( |
|
library |
The JDBC read-model topic of every persistent projection with listeners, shared by the query and the JPA read-model stores: its tables, their DDL per dialect, and their configuration. |
|
library |
Experimental. The |
|
library |
JPA aggregate command handling ( |
Saga
| Module | Kind | Purpose |
|---|---|---|
|
library |
Process-manager / saga core: |
|
library |
JDBC implementations of |
Bridges
| Module | Kind | Purpose |
|---|---|---|
|
starter |
Connects two areas when both are on the classpath: command handlers on event-sourced aggregates (CQRS + event sourcing) and commands sent from sagas (sagas + CQRS). The CQRS, event-sourcing and saga starters bring it; an application never declares it. |
Spring Modulith
| Module | Kind | Purpose |
|---|---|---|
|
library |
Spring Modulith Event Publication Registry integration: |
Full-stack bundles
These two starters are the recommended entry point for most applications. See Starters for guidance on which to pick.
| Module | Kind | Purpose |
|---|---|---|
|
starter |
Experimental. Full-stack JDBC bundle — activates event sourcing, CQRS, sagas, bridges, and |
|
starter |
Full-stack JPA bundle — activates event sourcing, CQRS with JPA aggregates, sagas, bridges, and |
Framework starters
| Module | Kind | Purpose |
|---|---|---|
|
starter |
Activates the topic storage on JDBC — the capture topic and its tables, the high-water-mark store and its detector — with the consumer runtime’s scheduler and executor, gated by |
|
starter |
Activates the consumer state on JDBC — the checkpoint store, the undelivered messages, the partition ownership and membership stores and their tables — with the consumer runtime: the topic consumer factory, its scheduler and executor, gated by |
|
starter |
Activates event-sourcing JDBC infrastructure: event store, snapshot store, and schema initializers. |
|
starter |
Experimental. Bundles |
|
starter |
Activates the JPA aggregate command-handler infrastructure and the read-model topics of JPA projections. |
|
starter |
Bare CQRS command and query buses — no persistence layer. This is the standalone command/query path for applications that do not use a relational store. It is intentionally omitted from Starters: every CQRS starter includes it. |
|
starter |
Activates saga persistence, scheduled deadline delivery, the capture topic and the consumer runtime that delivers events to sagas. |
|
starter |
Activates the |
|
starter |
Activates the Spring Modulith Event Publication Registry integration: registry-driven |
Test support
| Module | Kind | Purpose |
|---|---|---|
|
test starter |
Every Spring DDD test module as one |
|
test |
Test support for projections: |
|
test |
Test support for sagas: |
|
test |
Test DSLs for event sourcing: given/when/then over aggregates without a running store, and upcaster, snapshot-upcaster and downcaster tests. |
|
test |
Test support for relational stores: the |
Observability
| Module | Kind | Purpose |
|---|---|---|
|
library |
The endpoints, health indicators and metrics, without auto-configuration. Applications depend on the starter, not on this module. |
|
add-on starter |
Actuator endpoints, health indicators and metrics for the event store, consumers, topics and sagas, and trace propagation through messages; each section appears with the part it observes: the event store, the consumer runtime (consumers and topics), the JDBC saga store, and trace propagation with |
Internal
These modules are internal to the Spring DDD build. Do not declare them as application dependencies.
| Module | Kind | Purpose |
|---|---|---|
|
internal |
Internal end-to-end test harness. Not a user dependency. |
Choosing a starter
For most applications, the entry point is one of the two full-stack bundles. See Starters for the authoritative how-to, including a decision guide.
The table below shows exactly which modules each full-stack bundle aggregates, as declared in their build.gradle.kts files.
| Included module | spring-ddd-starter-jdbc |
spring-ddd-starter-jpa |
|---|---|---|
|
✓ |
✓ |
|
✓ |
— |
|
— |
✓ |
|
✓ |
✓ |
|
✓ |
✓ |