spring-projects / spring-projects/spring-data-commons
Auditing: `ConversionService` support for `CreatedBy`/`LastUpdatedBy`
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 838
- Forks
- 730
- PR merge metrics
- No merged PRs in 30d
Description
We have the use case, that createdby is sometimes the username (string) and sometimes the userid (Long), it depends whether data is only for internal use or not.
Currently ConversionService is only supported for date fields. It would be nice, if this could be also possible for auditor fields.
With ConversionService support it would be possible to use a single AuditorAware bean which will be converted to the right target type.
In addition its currently not possible to define two different AuditorAware as an alternative solution.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No file or test is identified. Start by locating the existing ConversionService handling for date auditing and the code that resolves CreatedBy and LastUpdatedBy values, then inspect related tests. Done means auditor values can be converted to their target types through one AuditorAware implementation, with coverage for string and Long targets.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100