From 87a212f093a6bc908de643cd1e9bac350ad21709 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90li?= <15040126243@163.com> Date: Fri, 18 Nov 2022 14:17:27 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E4=BC=98=E5=8C=96=20RepeatedlyRequest?= =?UTF-8?q?Wrapper=20=E6=B5=81=E5=A4=84=E7=90=86=20=E5=8E=BB=E9=99=A4?= =?UTF-8?q?=E5=A4=9A=E4=BD=99=E7=BC=96=E7=A0=81=E8=BD=AC=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ruoyi/common/filter/RepeatedlyRequestWrapper.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/filter/RepeatedlyRequestWrapper.java b/ruoyi-common/src/main/java/com/ruoyi/common/filter/RepeatedlyRequestWrapper.java index d1ff5a58..c1cbe3f2 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/filter/RepeatedlyRequestWrapper.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/filter/RepeatedlyRequestWrapper.java @@ -1,7 +1,6 @@ package com.ruoyi.common.filter; import cn.hutool.core.io.IoUtil; -import cn.hutool.core.util.StrUtil; import com.ruoyi.common.constant.Constants; import javax.servlet.ReadListener; @@ -13,7 +12,6 @@ import java.io.BufferedReader; import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStreamReader; -import java.nio.charset.StandardCharsets; /** * 构建可重复读取inputStream的request @@ -28,7 +26,7 @@ public class RepeatedlyRequestWrapper extends HttpServletRequestWrapper { request.setCharacterEncoding(Constants.UTF8); response.setCharacterEncoding(Constants.UTF8); - body = StrUtil.str(IoUtil.readBytes(request.getInputStream(), false), StandardCharsets.UTF_8).getBytes(); + body = IoUtil.readBytes(request.getInputStream(), false); } @Override