Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

varpa89
Copy link

@varpa89 varpa89 commented Jun 5, 2016

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

@pivotal-issuemaster
Copy link

@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
Copy link

@varpa89 Thank you for signing the Contributor License Agreement!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: waiting-for-triage An issue we've not yet triaged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants