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";
    }

 

上一篇:Authenticator


下一篇:Android Realm数据库使用,字节跳动+腾讯+华为+小米+阿里面试题分享