OpenFeign / OpenFeign/feign

How to map query parameters to class instance without @SpringQueryMap annotation?

Open
#1,858 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
9.8k
Forks
1.9k
Avg merge
1d 2h
Merged PRs (30d)
41

Description

Hi there.

Unfortunately, I couldn't find an answer to this question.

I have the next method, which is used by FeignClient:
PageDto<SomeDto> getPage(@PageableDefault(sort = {"id"}, size = 10) @ApiIgnore Pageable pageable, SearchObjectDto searchObjectDto);

And I always get the next exception:

Method has too many Body parameters

Are there ways to solve the problem without using SpringQueryMap annotation?

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

Start with the FeignClient method shown in the issue, including its Pageable and SearchObjectDto parameters, and trace how Feign handles unannotated parameters. Determine whether query mapping is supported without @SpringQueryMap; done means documenting a supported alternative or clarifying that the annotation is required.

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
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.