Feign & Pageable
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 9.8k
- Forks
- 1.9k
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 41
Description
Tell me how to properly configure the work of Feign and Spring Pageable Here are my Feign settings
feign:
okhttp:
enabled: true
autoconfiguration:
jackson:
enabled: true
client:
config:
default:
connectTimeout: ${FEIGN_DEFAULT_CONNECT_TIMEOUT:10000}
readTimeout: ${FEIGN_DEFAULT_READ_TIMEOUT:60000}
loggerLevel: full
errorDecoder: ru.core.config.TokenErrorDecoder
retryer: ru.service.SudisTokenService
My FeignClient
@FeignClient(name = "BaseCaseFeignClient", url = "${feign.services.host-backend.url}")
public interface BaseCaseFeignClient {
@GetMapping("/api/cases/base")
Page<BaseCaseEntityDto> getBaseCases(@SpringQueryMap BaseCaseEntityFilter filter, Pageable pageable);
@PostMapping("/api/cases/base/search")
Page<FoundRecordDto> searchCases(@RequestBody FilterSpecification filter, @SpringQueryMap Pageable pageable);
}
Get request works fine. Problem with post request. I am getting the following error
"No property caseOpenDttm: DESC found for type BaseCaseEntity!"
And in this case, the project is not going to be assembled at all.
Page<FoundRecordDto> searchCases(@RequestBody FilterSpecification filter, Pageable pageable);
Caused by: java.lang.IllegalStateException: Method has too many Body parameters: public abstract org.springframework.data.domain.Page ru..BaseCaseFeignClient.searchCases(ru.ilter.shared.basecase.search.FilterSpecification,org.springframework.data.domain.Pageable)
Warnings:
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 the BaseCaseFeignClient declaration and the reported errors, comparing the working GET method with the POST method's body and pageable parameters. Investigate how the Feign client handles Spring Pageable and multiple request-body parameters; done means the project assembles and the POST search request supports pagination without the shown property or body-parameter errors.
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
- 30/100