|
@ -13,6 +13,7 @@ import javax.servlet.http.HttpServletRequest; |
|
|
import javax.servlet.http.HttpServletRequestWrapper; |
|
|
import javax.servlet.http.HttpServletRequestWrapper; |
|
|
import java.io.ByteArrayInputStream; |
|
|
import java.io.ByteArrayInputStream; |
|
|
import java.io.IOException; |
|
|
import java.io.IOException; |
|
|
|
|
|
import java.nio.charset.StandardCharsets; |
|
|
import java.util.LinkedHashMap; |
|
|
import java.util.LinkedHashMap; |
|
|
import java.util.Map; |
|
|
import java.util.Map; |
|
|
|
|
|
|
|
@ -51,9 +52,9 @@ public class BodyReaderHttpServletRequestWrapper extends HttpServletRequestWrapp |
|
|
return super.getInputStream(); |
|
|
return super.getInputStream(); |
|
|
} |
|
|
} |
|
|
if (StrUtil.isBlank(bodyJson)) { |
|
|
if (StrUtil.isBlank(bodyJson)) { |
|
|
bodyJson = IOUtils.toString(super.getInputStream(), "utf-8"); |
|
|
bodyJson = IOUtils.toString(super.getInputStream(), StandardCharsets.UTF_8); |
|
|
} |
|
|
} |
|
|
final ByteArrayInputStream bis = new ByteArrayInputStream(bodyJson.getBytes("utf-8")); |
|
|
final ByteArrayInputStream bis = new ByteArrayInputStream(bodyJson.getBytes(StandardCharsets.UTF_8)); |
|
|
return new ServletInputStream() { |
|
|
return new ServletInputStream() { |
|
|
@Override |
|
|
@Override |
|
|
public boolean isFinished() { |
|
|
public boolean isFinished() { |
|
|