New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IllegalStateException: Method has too many Body parameters #793
Comments
at feign.Util.checkState(Util.java:128) ~[feign-core-9.5.1.jar:na]
at feign.Contract$BaseContract.parseAndValidateMetadata(Contract.java:117) ~[feign-core-9.5.1.jar:na]
at org.springframework.cloud.openfeign.support.SpringMvcContract.parseAndValidateMetadata(SpringMvcContract.java:133) ~[spring-cloud-openfeign-core-2.0.1.RELEASE.jar:2.0.1.RELEASE]
at feign.Contract$BaseContract.parseAndValidatateMetadata(Contract.java:66) ~[feign-core-9.5.1.jar:na]
at feign.ReflectiveFeign$ParseHandlersByName.apply(ReflectiveFeign.java:146) ~[feign-core-9.5.1.jar:na]
at feign.ReflectiveFeign.newInstance(ReflectiveFeign.java:53) ~[feign-core-9.5.1.jar:na]
at feign.Feign$Builder.target(Feign.java:218) ~[feign-core-9.5.1.jar:na]
at org.springframework.cloud.openfeign.HystrixTargeter.target(HystrixTargeter.java:39) ~[spring-cloud-openfeign-core-2.0.1.RELEASE.jar:2.0.1.RELEASE]
at org.springframework.cloud.openfeign.FeignClientFactoryBean.getObject(FeignClientFactoryBean.java:261) ~[spring-cloud-openfeign-core-2.0.1.RELEASE.jar:2.0.1.RELEASE]
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:171) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE] |
A few things here you may want to double check. First, you are mixing Feign and Spring annotations. I suggest Next, annotation values must be literals. Your use of a constant in the |
Were you able to get this resolved? |
I'm going to close this issue and recommend that questions like this be made on Stack Overflow, allowing more users to help you. |
I had this issue because I was mixing Feign annotations with Spring annotations. In the particular case, I was using |
Request method:
Can you please tell me how to use request body and dynamic headers at the same time?
Thanks a lot.
The text was updated successfully, but these errors were encountered: