Have any one had issues with using @DomainEvents with a Spring Data repository having @Cacheable decorated methods. It seems the domainEvents object don't get initialized when data comes from cache and hence give a NPE . This happens cause the transient variable not getting initialized when the data is coming from cache.
My caching repository is pretty simple looks like this, just the cache implementation I am using is based on Apache ignite. As a workaround currently I am not using domain events for cacheable methods, but I hope we can resolve this to get over the boilerplate and NPE issues.