@RequestMapping("esword")
@ResponseBody
public void inertEsWord(HttpServletRequest request, HttpServletResponse response){

String content = "星星之火可以燎原";

// 返回数据
OutputStream out= null;
try {
out = response.getOutputStream();
response.setHeader("Last-Modified", String.valueOf(content.length()));

response.setHeader("ETag",String.valueOf(content.length()));

response.setContentType("text/plain; charset=utf-8");

out.write(content.getBytes("utf-8"));

out.flush();
} catch (IOException e) {
e.printStackTrace();
}
LOGGER.info(content+"这是读取数据值");
}

相关文章:

  • 2021-06-27
  • 2021-06-22
  • 2021-06-05
  • 2022-12-23
  • 2021-07-08
  • 2021-10-22
  • 2021-08-12
  • 2022-12-23
猜你喜欢
  • 2021-08-02
  • 2021-04-21
  • 2022-12-23
  • 2022-12-23
  • 2021-10-08
  • 2021-06-19
相关资源
相似解决方案