try {
noticeMsg = new String(UserUtils.readInputStream(request.getInputStream()), "UTF-8");
} catch (Exception e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
public static byte[] readInputStream(InputStream inStream) throws Exception {
ByteArrayOutputStream outSteam = new ByteArrayOutputStream();
byte[] buffer = new byte[1024];
boolean var3 = false;
int len;
while((len = inStream.read(buffer)) != -1) {
outSteam.write(buffer, 0, len);
}
outSteam.close();
inStream.close();
return outSteam.toByteArray();
}
最后推荐一个比较成熟的spring cloud 架构,欢迎大家收藏 https://gitee.com/gitsc/pro-cloud