Feign的编解码器
编码器
在向服务发送请求时,有些情况需要对请求内容进行处理
1 2 3 4
| public class FeignSpringFormEncoder implements Encoder {
@Override public void encode(Object object, Type bodyType, RequestTemplate template) throws EncodeException
|
解码器
可以对服务响应的内容进行处理
1 2 3 4
| public class FeignDecoder implements Decoder {
@Override public Object decode(Response response, Type type) throws IOException, DecodeException, FeignException
|