当前使用SpringCloud 的Greenwich.RELEASE版本
Feign实现文件上传

客户端异常如下:
Caused by: com.fasterxml.jackson.core.JsonParseException: Illegal character ((CTRL-CHAR, code 31)): only regular white space (\r, \n, \t) is allowed between tokens
解决方法:
引入feign-okhttp
<dependency>
<groupId>io.github.openfeign</groupId>
<artifactId>feign-okhttp</artifactId>
</dependency>
Feign文件上传异常解决
在使用SpringCloud Greenwich.RELEASE版本中,通过Feign实现文件上传时遇到非法字符错误。解决方法为引入feign-okhttp依赖,有效避免了在文件上传过程中出现的JSON解析异常。
575

被折叠的 条评论
为什么被折叠?



