class JsonHttpServletRequestWrapper extends HttpServletRequestWrapper {
    private byte[] body;

    public JsonHttpServletRequestWrapper(HttpServletRequest request) {
        super(request);
        //保存一份InputStream，将其转换为字节数组
        try {
            body = StreamUtils.copyToByteArray(request.getInputStream());
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    /**
     * 转换成String
     *
     * @return
     */
    public String getBodyString() {
        String bodyString = new String(body, StandardCharsets.UTF_8);
        return bodyString;
    }

    @Override
    public BufferedReader getReader() throws IOException {
        return new BufferedReader(new InputStreamReader(getInputStream()));
    }

    /**
     * 把保存好的InputStream，传下去
     *
     * @return
     * @throws IOException
     */
    @Override
    public ServletInputStream getInputStream() throws IOException {<FILL_FUNCTION_BODY>}
}

        final ByteArrayInputStream bais = new ByteArrayInputStream(body);
        return new ServletInputStream() {
            @Override
            public int read() throws IOException {
                return bais.read();
            }

            @Override
            public boolean isFinished() {
                return false;
            }

            @Override
            public boolean isReady() {
                return false;
            }

            @Override
            public void setReadListener(ReadListener listener) {

            }
        };
    
<no_super_class>