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

Merge pull request !240 from 聆听/N/A
感谢反馈
This commit is contained in:
Chopper711 2022-09-28 07:45:46 +00:00 committed by Gitee
commit 2bc6d1bc9a
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

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() {