Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Example for @DomainEvents and @AfterDomainEventsPublication

I have encountered the @DomainEvents and @AfterDomainEventsPublication annotation in spring Data JPA Reference Documentation. But I am not able to find the perfect example to explain about these annotaions

like image 422
Sathyendran a Avatar asked Mar 11 '17 08:03

Sathyendran a


1 Answers

You can see sample in the original unit tests for EventPublishingRepositoryProxyPostProcessor EventPublishingRepositoryProxyPostProcessorUnitTests.java by Oliver Gierke in GitHub Repository of Spring Data Commons.

Description in base issue of Spring Jira DATACMNS-928 Support for exposing domain events from aggregate roots as Spring application events was useful for me.

UPDATE

This is simple and really working example by Zoltan Altfatter: Publishing domain events from aggregate roots

like image 179
Dmitry Stolbov Avatar answered Oct 13 '22 16:10

Dmitry Stolbov