I’m thinking about audit attributes in our domain. What we basically need is to have informations about who and when created/modified entities.
I’ve read about auditing-interceptor but I’m not sure if I understand it correctly.
Let’s say I have command in which I don’t have any informations about user/date. So my best possibility is to add attributes (userId and currentTimestamp) to my command and fill those informations inside AuditingInterceptor (I’m using spring so I’d like to get informations from within spring beans)?
Then also extend my events with same attributes and implement MetaDataMutatingUnitOfWorkListenerAdapter?
Or is this approach wrong?