Spring Cloud全解析:服务调用之Feign的编解码器
文章目录
Feign的编解码器
编码器
在向服务发送请求时,有些情况需要对请求内容进行处理
public class FeignSpringFormEncoder implements Encoder {
@Override
public void encode(Object object, Type bodyType, RequestTemplate template) throws EncodeException
解码器
可以对服务响应的内容进行处理
public class FeignDecoder implements Decoder {
@Override
public Object decode(Response response, Type type) throws IOException, DecodeException, FeignException
参考文献
原文地址:https://blog.csdn.net/Lxn2zh/article/details/142251157
免责声明:本站文章内容转载自网络资源,如本站内容侵犯了原著者的合法权益,可联系本站删除。更多内容请关注自学内容网(zxcms.com)!