spring-cloud / spring-cloud/spring-cloud-openfeign
@SpringQueryMap not working with Java Record
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.3k
- Forks
- 838
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 13
Description
Describe the bug
The problem is with @SpringQueryMap because it uses PageableSpringQueryMapEncoder which extends BeanQueryMapEncoder, limiting it to just these two encoders.
In feign.QueryMap, you can define mapEncoder as either BEAN or FIELD.
Solution: Defines the Bean:
@Bean
public QueryMapEncoder feignQueryMapEncoderPageable() {
return new FieldQueryMapEncoder();
}
However, it is incompatible with Pageable throwing exception:
Request processing failed: java.lang.IllegalStateException: Duplicate key serialVersionUID (attempted merging values -4541509938956089562 and 1232825578694716871)] with root cause
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 with PageableSpringQueryMapEncoder and its BeanQueryMapEncoder relationship, then compare the feign.QueryMap BEAN and FIELD options with FieldQueryMapEncoder. Reproduce the Java Record and Pageable cases described in the issue; done means record query parameters work without breaking Pageable or causing the duplicate serialVersionUID exception.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100