Postman中binary传递文件后台怎么接收
@PostMapping(value = "getData")
@ResponseBody
public String getData(HttpServletRequest request){
BufferedReader br=null;
try{
br=new BufferedReader(new InputStreamReader(request.getInputStream(),"utf-8"));
//获取请求参数
StringBuffer sb=new StringBuffer("");
String temp=null;
while((temp=br.readLine())!=null){
sb.append(temp);
}
String inputParamsJsonString=sb.toString();
logger.info("inputParamsJsonString="+inputParamsJsonString);
}catch(IOException e){
e.printStackTrace();
}
return"async";
}
————————————————
版权声明:本文为CSDN博主「Howard_Stark」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/Howard_Stark/article/details/118004130
https://www.cnblogs.com/huahua035/p/10883519.html
--以上待调试