• 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 ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
  • Paul Clapham
Sheriffs:
  • paul wheaton
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Piet Souris
Bartenders:
  • Mike London

Call logic after /patch/request in Spring Data REST

 
Greenhorn
Posts: 21
1
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.
reply
    Bookmark Topic Watch Topic
  • New Topic