🐛 修复在部分linux服务器上由此导致接口中中文参数乱码问题

Signed-off-by: 聆听 <sunlisten.gzm@foxmail.com>
This commit is contained in:
聆听
2022-09-23 09:29:30 +00:00
committed by Gitee
parent 1705817128
commit ee53ddd097

View File

@@ -181,7 +181,7 @@ public class XssHttpServletRequestWrapper extends HttpServletRequestWrapper {
//将resultMap转换为json字符串
String resultStr = JSONUtil.toJsonStr(resultMap);
//将json字符串转换为字节
final ByteArrayInputStream resultBIS = new ByteArrayInputStream(resultStr.getBytes());
final ByteArrayInputStream resultBIS = new ByteArrayInputStream(resultStr.getBytes(StandardCharsets.UTF_8));
//实现接口
return new ServletInputStream() {