spring-data-rest icon indicating copy to clipboard operation
spring-data-rest copied to clipboard

DATAREST-836 Provide ability to handle 'after' Http findOne event

Open varpa89 opened this issue 8 years ago • 2 comments

At the moment to read item resource by ID spring data rest uses JPA repository 'findOne' method. There are some different use cases to use this method:

  1. Custom jackson deserializer (via RepositoryInvoker.invokeFindOne())
  2. Spring data rest RepositoryEntityController (via RepositoryInvoker.invokeFindOne())
  3. Another application business logic (via JPA repository) In some use cases we need
  4. To secure findOne
  5. To count usage of findOne from HTTP requests Provide security via findOne in some cases make different troubles (deserialization an entity to object by ID) and may be unnecessary. In this issue I suggest to implement HandleAfterFindOne annotation and AfterFindOneEvent event and publish them in RepositoryEntityController. So we could use annotated handlers

varpa89 avatar Jun 05 '16 20:06 varpa89

@varpa89 Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

pivotal-issuemaster avatar Jan 09 '17 14:01 pivotal-issuemaster

@varpa89 Thank you for signing the Contributor License Agreement!

pivotal-issuemaster avatar Jan 09 '17 14:01 pivotal-issuemaster