Overridable QueryMapEncoder (#183)

Added the possibility to override the default QueryMapEncoder by defining a custom one in the ApplicationContext.
This commit is contained in:
Jánoky László Viktor
2019-06-03 17:12:52 +02:00
committed by Spencer Gibb
parent e531539e77
commit 3a60921794
3 changed files with 28 additions and 1 deletions

View File

@@ -128,6 +128,7 @@ Spring Cloud Netflix _does not_ provide the following beans by default for feign
* `Request.Options`
* `Collection<RequestInterceptor>`
* `SetterFactory`
* `QueryMapEncoder`
Creating a bean of one of those type and placing it in a `@FeignClient` configuration (such as `FooConfiguration` above) allows you to override each one of the beans described. Example:
@@ -487,3 +488,5 @@ public class DemoTemplate {
String demoEndpoint(@SpringQueryMap Params params);
}
----
If you need more control over the generated query parameter map, you can implement a custom `QueryMapEncoder` bean.