spring-projects / spring-projects/spring-data-commons

Adding custom converter to Projection

Open
#2,335 6 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

for: team-attention status: feedback-provided status: waiting-for-triage
Dominant language
Java
Stars
838
Forks
730
PR merge metrics
No merged PRs in 30d

Description

Hi,
in previous versions it was possible to register custom converter for proxy projections via shared instance:
https://github.com/spring-projects/spring-data-commons/blob/2.3.x/src/main/java/org/springframework/data/projection/ProxyProjectionFactory.java#L64

However in most recent version (2.4.x) it is not possible anymore as new instance is used instead of shared one. What is the correct way to register custom converter?
https://github.com/spring-projects/spring-data-commons/blob/fa7ddcb223bda38699831fb3c1abcad568d93494/src/main/java/org/springframework/data/projection/ProxyProjectionFactory.java#L53

Thank you
Martin

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Compare ProxyProjectionFactory.java in the referenced 2.3.x and 2.4.x revisions, then review the issue's six comments for any proposed registration path. Determine whether the supported custom-converter mechanism is documented or needs restoring, and confirm completion by establishing a clear way to register the converter in the current version.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.