spring-projects / spring-projects/spring-session
Serialized session losing property editors
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.9k
- Forks
- 1.2k
- Avg merge
- 4h 27m
- Merged PRs (30d)
- 55
Description
We have a @Controller that uses @InitBinder to register a custom property editor. When there are data binding errors the BeanPropertyBindingResult is saved to the session in Spring's flash map but the BeanWrapper containing the property editors is transient, causing errors when values are retrieved and not converted properly.
There are some issues relating to this, https://jira.spring.io/browse/SPR-2569 and https://jira.spring.io/browse/SPR-2674, that suggest property editors should be re-applied after the binding result has been retrieved from the session. Is there a way to do this at the application level or would this need a pull request for spring-session?
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
Start by tracing how BeanPropertyBindingResult is stored in and retrieved from Spring's flash map, focusing on the transient BeanWrapper and the @InitBinder entry point. Check the linked SPR-2569 and SPR-2674 issues for expected behavior; done means the handling of custom property editors after session retrieval is clearly established and covered by the relevant project tests.
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
- 25/100