• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
  • Bear Bibeault
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Piet Souris
  • salvin francis
  • Stephan van Hulst
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Jj Roberts

Call logic after /patch/request in Spring Data REST

 
Greenhorn
Posts: 19
1
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
  • 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.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic