1.在项目soms-bo通过feign调用soms-auth报错:
feign.codec.DecodeException: Error while extracting response for type [java.util.List<com.sz.soms.auth.api.facade.user.vo.UserInfoVO>] and content type [application/json]; nested exception is org.springframework.http.converter.HttpMessageNotReadableException: JSON parse error: Illegal character ((CTRL-CHAR, code 31)): only regular white space (\r, \n, \t) is allowed between tokens; nested exception is com.fasterxml.jackson.core.JsonParseException: Illegal character ((CTRL-CHAR, code 31)): only regular white space (\r, \n, \t) is allowed between tokens
at [Source: (PushbackInputStream); line: 1, column: 2]
解决:在soms-bo的配置上增加配置:
feign:
compression: #gzip压缩
request:
enabled: true
min-request-size: 2048
mime-types: text/xml,application/xml,application/json
response:
enabled: true
useGzipDecoder: true