IDEA String boot 解决中文乱码的问题!

解决办法一!
response.setCharacterEncoding("UTF-8");
response.setContentType("text/html; charset=utf-8”);
 
HttpServletResponse response
 
办法二
 
经过尝试,以上两种办法均无效, 最终解决办法:
最终是把 @RequestMapping  加上一行代码  produces=“text/html;charset=UTF-8” 
证实有效!!!

猜你喜欢

转载自www.cnblogs.com/webooa/p/10119481.html