Skip to content

IllegalArgumentException: Negated params are not supported #1134

@ragnor

Description

@ragnor

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.

Metadata

Metadata

Labels

bugSomething isn't working

Type

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions