public class EventPublishingRepositoryProxyPostProcessor extends Object implements RepositoryProxyPostProcessor
RepositoryProxyPostProcessor to register a MethodInterceptor to intercept
CrudRepository.save(Object) and CrudRepository.delete(Object) methods and publish events potentially
exposed via a method annotated with DomainEvents. If no such method can be detected on the aggregate root, no
interceptor is added. Additionally, the aggregate root can expose a method annotated with
AfterDomainEventPublication. If present, the method will be invoked after all events have been published.| Constructor and Description |
|---|
EventPublishingRepositoryProxyPostProcessor(ApplicationEventPublisher publisher) |
| Modifier and Type | Method and Description |
|---|---|
void |
postProcess(ProxyFactory factory,
RepositoryInformation repositoryInformation)
Manipulates the
ProxyFactory, e.g. add further interceptors to it. |
public EventPublishingRepositoryProxyPostProcessor(ApplicationEventPublisher publisher)
public void postProcess(ProxyFactory factory, RepositoryInformation repositoryInformation)
RepositoryProxyPostProcessorProxyFactory, e.g. add further interceptors to it.postProcess in interface RepositoryProxyPostProcessorfactory - will never be null.repositoryInformation - will never be null.Copyright © 2011–2021 Pivotal Software, Inc.. All rights reserved.