diff --git a/multi/multi_spring-cloud-feign.html b/multi/multi_spring-cloud-feign.html index 5289f5a4..fa5d290c 100644 --- a/multi/multi_spring-cloud-feign.html +++ b/multi/multi_spring-cloud-feign.html @@ -189,25 +189,25 @@ feign.compression.request.min-request-size=2048 Logger.Level feignLoggerLevel() { return Logger.Level.FULL; } -}
OtherClass.someMethod(myprop.get()); - } } -stripped). The proxy uses Ribbon to locate an instance to forward to -via discovery, and all requests are executed in a -<<hystrix-fallbacks-for-routes, hystrix command>>, so -failures will show up in Hystrix metrics, and once the circuit is open -the proxy will not try to contact the service.
The OpenFeign @QueryMap annotation provides support for POJOs to be used as
-GET parameter maps. Unfortunately, the default OpenFeign QueryMap annotation is
-incompatible with Spring because it lacks a value property.
Spring Cloud OpenFeign provides an equivalent @SpringQueryMap annotation, which
-is used to annotate a POJO or Map parameter as a query parameter map.
For example, the Params class defines parameters param1 and param2:
// Params.java -public class Params { - private String param1; - private String param2; - // [Getters and setters omitted for brevity] -}
The following feign client uses the Params class by using the @SpringQueryMap annotation:
@FeignClient("demo") -public class DemoTemplate { +=== Feign `@QueryMap` support - @GetMapping(path = "/demo") - String demoEndpoint(@SpringQueryMap Params params); -}