springboot 自定义响应体大小测试接口

@ResponseBody

@RequestMapping("/def/response/body/service")

public StringBuilder defResponseBodyService(@RequestParam(name="count") Integer count,HttpServletRequest HttpRequest) throws InterruptedException{

    String baseStr = "010101010101010101010101010101"; //32字符长度

    StringBuilder sb = new StringBuilder();

    for(i=1;i<=count;i++){

           for(y=1;y<=32;y++){

               sb.append(baseStr);

          }

    }

    LOG.info("长度是"+sb.length());

    return sb;

}

posted @ 2023-11-28 21:32  遇事不决,量子力学  阅读(68)  评论(0编辑  收藏  举报