Skip to content
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

IllegalArgumentException: Negated params are not supported #1134

Open
ragnor opened this issue Nov 29, 2024 · 1 comment
Open

IllegalArgumentException: Negated params are not supported #1134

ragnor opened this issue Nov 29, 2024 · 1 comment

Comments

@ragnor
Copy link

ragnor commented Nov 29, 2024

After updating from 4.0.x to 4.1.4 I've noticed that my services cannot startup due to:

Caused by: java.lang.IllegalArgumentException: Negated params are not supported: !sync
at org.springframework.cloud.openfeign.support.SpringMvcContract.parseParams(SpringMvcContract.java:372) ~[spring-cloud-openfeign-core-4.1.4.jar:4.1.4]
at org.springframework.cloud.openfeign.support.SpringMvcContract.processAnnotationOnMethod(SpringMvcContract.java:249) ~[spring-cloud-openfeign-core-4.1.4.jar:4.1.4]
at feign.Contract$BaseContract.parseAndValidateMetadata(Contract.java:112) ~[feign-core-13.5.jar:na]
at org.springframework.cloud.openfeign.support.SpringMvcContract.parseAndValidateMetadata(SpringMvcContract.java:198) ~[spring-cloud-openfeign-core-4.1.4.jar:4.1.4]
at feign.Contract$BaseContract.parseAndValidateMetadata(Contract.java:71) ~[feign-core-13.5.jar:na]
at feign.ReflectiveFeign$ParseHandlersByName.apply(ReflectiveFeign.java:140) ~[feign-core-13.5.jar:na]
at feign.ReflectiveFeign.newInstance(ReflectiveFeign.java:59) ~[feign-core-13.5.jar:na]
at feign.ReflectiveFeign.newInstance(ReflectiveFeign.java:51) ~[feign-core-13.5.jar:na]
at feign.Feign$Builder.target(Feign.java:202) ~[feign-core-13.5.jar:na]
at org.springframework.cloud.openfeign.DefaultTargeter.target(DefaultTargeter.java:30) ~[spring-cloud-openfeign-core-4.1.4.jar:4.1.4]
at org.springframework.cloud.openfeign.FeignClientFactoryBean.getTarget(FeignClientFactoryBean.java:504) ~[spring-cloud-openfeign-core-4.1.4.jar:4.1.4]
at org.springframework.cloud.openfeign.FeignClientFactoryBean.getObject(FeignClientFactoryBean.java:456) ~[spring-cloud-openfeign-core-4.1.4.jar:4.1.4]
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:182) ~[spring-beans-6.1.15.jar:6.1.15]
... 29 common frames omitted

Changes were introduced by c276f1c#diff-d7125c419c7e91db20fe7e903b744c180165b6271b6d68e5b966760eb1a3c067.

Is there any way to disable this check in SpringMvcContract?
I understand that feign doesn't use negated parameters but I use shared interfaces between server and client. Negated parameters are needed on server side to avoid ambiguous mappings.

@ragnor
Copy link
Author

ragnor commented Dec 2, 2024

I've noticed that Spring Cloud OpenFeign is already in maintenance mode and I should migrate to Spring Interface Clients.

Is there any official guide how to perform migration?

Does Spring Cloud OpenFeign support *Exchange annotations (e.g. @HttpExchange) so as a first step in migration I can change mapping descriptions in interfaces?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants