The @JaversStream annotation declares a handler class that watches Javers audit snapshots for changes to a specific entity type. It is the entry point for the FlowWarden Javers integration module.
Basic Usage
@JaversStream requires the flowwarden-javers module on your classpath. The auto-configuration activates only when Javers is detected.
Attributes Reference
Compatible Annotations
The following FlowWarden annotations can be combined with @JaversStream:
Handler Annotations
How It Works Internally
JaversStreamBeanPostProcessor discovers classes annotated with @JaversStream
- Creates a
ChangeStreamDefinition watching the Javers snapshot collection
- Registers it with FlowWarden’s
StreamRegistry
- On each snapshot insert, an internal dispatcher:
- Filters by
globalId.entity matching the configured entityType
- Deserializes the
state field into the domain object via Spring’s MongoConverter
- Reconstructs the
CdoSnapshot via Javers’ JSON converter
- Dispatches to the matching
@OnInitial, @OnUpdate, or @OnTerminal handler