Describe the bug
I built a toc-server, request from my main-server via feign client. These methods have same definition.
When I debug, it seems feignClient is not null ,with name and domain name. Both the servers are running, but the resp throws an exception, says:org.springframework.web.util.NestedServletException: Handler dispatch failed; nested exception is java.lang.NoSuchMethodError: feign.Request.requestBody()Lfeign/Request$Body; and I can't find where the question is .
Sample it is the feign client definition:
@GetMapping(value = "/get/grant/detail")
ResponseVO<GrantDetailVO> getGrantDetail(@RequestParam("id") Long id);
it is the toc- server code
ResponseVO<GrantDetailVO> vo = null;
try {
vo = userClient.getGrantDetail(id); //this line throws noSuchMethod ex
...
}
these servers both use spring-boot-openfeign 2.2.1-RELEASE by the way, userClient is autoConfigurated by spring.factories, and it is notnull.
Comment From: galaxy-sea
hello @zoe610 ,This may be caused by the incompatibility of the relevant dependencies of openFeign you use. reference java.lang.NoClassDefFoundError: feign/Request$Body in feign while adding support for multipart/form-data
Comment From: OlgaMaciaszek
Hello @zoe610, 2.2.1-RELEASE has not been supported for a long time now. Please upgrade to a supported version (3.1.5 - with Boot 2.7.5 or 4.0.1 - with Boot 3.0.2 and verify. If the issue persists, please provide a minimal, complete, verifiable example that reproduces the issue.
Comment From: spring-cloud-issues
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.
Comment From: spring-cloud-issues
Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.