With Feign directives the decodeSlash parameter of RequestLine directive deals with it, see https://stackoverflow.com/questions/43889140/feign-url-encode-path-params There is no such thing with spring XXXMapping directive (which can not be modified). (PR for fix to come)
Comment From: cosyman
I solved it by the following code, but native support will be appreciated
@Bean
SpringMvcContract decodeSlashContract() {
return new SpringMvcContract() {
@Override
protected void processAnnotationOnMethod(MethodMetadata data, Annotation methodAnnotation, Method method) {
super.processAnnotationOnMethod(data, methodAnnotation, method);
if (!NotDecodeSlash.class.isInstance(methodAnnotation) && !methodAnnotation
.annotationType().isAnnotationPresent(NotDecodeSlash.class)) {
data.template().decodeSlash(false);
}
}
};
}
@Target(METHOD)
@Retention(RUNTIME)
public @interface NotDecodeSlash {
}
Comment From: RaphC
hi @cosyman can you edit NotDecodeSlash class annotation please?
Comment From: cosyman
@RaphC Yes,just a mark annotation.
Comment From: fdirlikli
@ryanjbaxter, @adriancole Are you still interested in this if I come up with a PR?
Comment From: ryanjbaxter
PRs are welcome sure
Comment From: swaroopak
I am working on this issue as a part of gracehopperOSD
Comment From: OlgaMaciaszek
Fixed with https://github.com/spring-cloud/spring-cloud-openfeign/commit/d419826ca0d17c94ffd8829442096c1d7fbf90b9.
Comment From: nagy3n
When will you release the new version?