posted 2 years ago
I am using Spring Data REST.
In case of one /patch/ request for one particular entity, I would do sth (in this case send an event.
As I do not have code of /patch/ method because of Spring Data REST, I tried tu use @RepositoryEventHandler and @HandleAfterSave annotations
It works, but handleAfterSave is called everytime I save MyObj entity. I want to call my logic only after saving object via /path/ request. How can I achieve it? Maybe via aspects? However, because I do not have the GetPatch method in my project, I have no idea how to wrap it by aspects.