spring-data-rest
spring-data-rest copied to clipboard
DATAREST-836 Provide ability to handle 'after' Http findOne event
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:
- Custom jackson deserializer (via RepositoryInvoker.invokeFindOne())
- Spring data rest RepositoryEntityController (via RepositoryInvoker.invokeFindOne())
- Another application business logic (via JPA repository) In some use cases we need
- To secure findOne
- 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 Please sign the Contributor License Agreement!
Click here to manually synchronize the status of this Pull Request.
See the FAQ for frequently asked questions.
@varpa89 Thank you for signing the Contributor License Agreement!