|
|
|
@ -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
|
|
|
|
|