private byte[] getParameterByte(HttpServletRequest request) throws IOException {
int contentLength = request.getContentLength();
if (contentLength < 0) {
return null;
}
byte[] buffer = new byte[contentLength];
for (int i = 0; i < contentLength; ) {
int readLen = request.getInputStream().read(buffer, i, contentLength - i);
if (readLen == -1) {
break;
}
i += readLen;
}
return buffer;
}
LoginUserDTO loginUserDTO = JSON.parseObject(new String(parameterByte, StandardCharsets.UTF_8), LoginUserDTO.class);