ddd4j-annotation
Installation
SKILL.md
ddd4j Annotation
Overview
Choose annotations by their consumers and runtime semantics. Do not assume that an annotation's name implies it registers a Bean, persists a field, or fires an event.
When to Use
- Choosing which annotation family (ddd/Contract, cqrs, api, orm) fits a new field, method, or class.
- Applying
@BizKey,@TenantId,@SystemId,@OnCreate,@OnUpdate, or@OrderByto a PO and needing the consumer wired. - Adding
@ApiIdempotent,ApiModule,ApiOperationLog, orRawResponseto an endpoint and asking what must implement the behavior. - Marking aggregate state changes with
CreateEvent,UpdateEvent, orDeleteEvent. - Reviewing existing annotation usage: retention, target, defaults, and whether a real consumer exists.
- Introducing a new ddd4j annotation and its test set (independence, default-value, target, consumer).
When NOT to Use
Do not use this skill when: