调用方式
@FeignClient(name = "remoteUserManagerService", url = "${base.url}") public interface RemoteUserManagerService { /** * 验证token是否正确 * * @return 结果 */ @GetMapping(value = "/usermanager/user/pageList") public MessageBean listUserListVOs(@RequestParam("pageNum") Integer pageNum,@RequestParam("pageSize")Integer pageSize, @RequestParam("name")String name, @RequestHeader MultiValueMap <String ,String> headers);
@RequestParam无法直接加实体类,需要加编码器,如果请求参数不是太多的话,直接按照上述方法请求,但会报 JSON parse error Illegal character ((CTRL-CHAR, code 31)) only regular white space (r 下面是解决方法
配置文件添加
feign: compression: response: useGzipDecoder: true
标签:feign,code,RequestParam,CTRL,Illegal,数据类型,parse,regular From: https://www.cnblogs.com/xiaoni-fighting/p/16664251.html