Class DecoratedQueryMapEncoder

  • All Implemented Interfaces:
    feign.QueryMapEncoder, Refreshable

    public class DecoratedQueryMapEncoder
    extends DecoratedFeignComponent<feign.QueryMapEncoder>
    implements feign.QueryMapEncoder
    Since:
    0.0.1
    Author:
    韩超, Mercy
    • Constructor Detail

      • DecoratedQueryMapEncoder

        public DecoratedQueryMapEncoder​(java.lang.String contextId,
                                        org.springframework.cloud.openfeign.FeignContext feignContext,
                                        org.springframework.cloud.openfeign.FeignClientProperties clientProperties,
                                        feign.QueryMapEncoder delegate)
    • Method Detail

      • componentType

        protected java.lang.Class<? extends feign.QueryMapEncoder> componentType()
        Returns the QueryMapEncoder implementation class to use when reloading the delegate after a refresh. Defaults to PageableSpringQueryMapEncoder.

        Example Usage:

        
         Class<? extends QueryMapEncoder> type = decoratedQueryMapEncoder.componentType();
         
        Specified by:
        componentType in class DecoratedFeignComponent<feign.QueryMapEncoder>
        Returns:
        the PageableSpringQueryMapEncoder class
      • encode

        public java.util.Map<java.lang.String,​java.lang.Object> encode​(java.lang.Object object)
        Encodes the given object into a query parameter map by delegating to the underlying QueryMapEncoder implementation.

        Example Usage:

        
         Map<String, Object> queryParams = decoratedQueryMapEncoder.encode(myQueryObject);
         
        Specified by:
        encode in interface feign.QueryMapEncoder
        Parameters:
        object - the object to encode as query parameters
        Returns:
        a Map of query parameter names to values