• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
  • Paul Clapham
  • paul wheaton
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Piet Souris
  • Mike London

Call logic after /patch/request in Spring Data REST

Posts: 21
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
    Bookmark Topic Watch Topic
  • New Topic