参考代码如下:
final_request.setCharacterEncoding("UTF-8");
  StringBuilder buffer = new StringBuilder();
  BufferedReader reader=null;
  try{
   reader = new BufferedReader(new InputStreamReader(final_request.getInputStream(),"UTF-8"));
   String line=null;
   while((line = reader.readLine())!=null){
    buffer.append(line);
         }
  }catch(Exception e){
   e.printStackTrace();
  }finally{
   if(null!=reader){
    try {
     reader.close();
    } catch (IOException e) {
     e.printStackTrace();
    }
   }
  }
buffer.toString()
自己代码如下,亲测没有问题
接口客户端请求输入:
http://10.11.100.250:9999/MVC/down/WebInterfaceTempletDown.dx
POST方式:Content-Type:application/json;charset=UTF-8
传入的json 
{
     "monId":"20191229135102184",
     "groupId":"004",
     "proberId":"03",
     "title":"TTTTTT",
     "monType":"c01-job-running-error"
}
服务端:
public ModelAndView handleRequestInternal(HttpServletRequest request,
HttpServletResponse response) throws Exception {
System.out.println("into webinterface down gate");
  //request.setCharacterEncoding("GBK");
  request.setCharacterEncoding("UTF-8"); 
   
  StringBuffer str = new StringBuffer();   
  try {  
  //BufferedInputStream in = new BufferedInputStream(request.getInputStream()); 
           InputStreamReader in = new InputStreamReader(request.getInputStream(),"UTF-8");
           int i;  
           char c;  
           while ((i=in.read())!=-1) {  
              c=(char)i;  
              str.append(c);  
           }  
   }catch (Exception ex) {  
         ex.printStackTrace();  
   }  
    
        JSONObject obj= JSONObject.fromObject(str.toString());  
        System.out.println(obj.get("operUser")); 

request.getInputStream中文乱码解决方案相关推荐

  1. Spring MVC POST中文乱码解决方案

    2019独角兽企业重金招聘Python工程师标准>>> POST中文乱码解决方案 1.自己编写一个filter,来实现编码,代码如下: 1 public class Characte ...

  2. JSP中文乱码解决方案了解和TOMCAT中文乱码解决

    java 中文乱码终极解决方案 首先,确保你的数据库是支持中文的.把数据库的编码方式设置能支持中文的,如GB2132,utf-8等,而且经过测试后确实能写入中文且正常显示.这样就就保证了数据库确实是支 ...

  3. iis 站点中文乱码 解决方案

    iis 站点中文乱码 解决方案 参考文章: (1)iis 站点中文乱码 解决方案 (2)https://www.cnblogs.com/zhaokunbokeyuan256/p/10001726.ht ...

  4. Spring RestTemplate中文乱码解决方案

    Spring RestTemplate中文乱码解决方案 参考文章: (1)Spring RestTemplate中文乱码解决方案 (2)https://www.cnblogs.com/accesski ...

  5. python写入csv文件中文乱码解决方案

    python写入csv文件中文乱码解决方案 参考文章: (1)python写入csv文件中文乱码解决方案 (2)https://www.cnblogs.com/vsivn/p/6115537.html ...

  6. Windows 10 powershell 中文乱码解决方案

    Windows 10 powershell 中文乱码解决方案 参考文章: (1)Windows 10 powershell 中文乱码解决方案 (2)https://www.cnblogs.com/we ...

  7. POST中文乱码解决方案

    2019独角兽企业重金招聘Python工程师标准>>> POST中文乱码解决方案 ? Spring Web MVC提供了Filter用于解决POST方式造成的中文乱码问题,具体配置 ...

  8. PHP——PHP读取MySQL数据库中文乱码解决方案

    问题描述 PHP读取MySQL数据库中文乱码 解决方案 静态页面  <head> <metahttp-equiv="Content-Type"content=&q ...

  9. mysql中文乱码解决方案_Mysql中文乱码解决方案

    Mysql中文乱码解决方案 时间:2017-07-11     来源:华清远见JAVA学院 中文乱码问题一直是我们编程过程中比较常见又让人头疼的问题,但是只要按照标准进行配置,就能很好的避免出现中文乱 ...

最新文章

  1. SQLite与pandas
  2. input标签加disabled属性后无法获得其value值
  3. [转]PowerDesigner使用
  4. spoj Help the Military Recruitment Office!
  5. SS CMS 全新跨平台 V7.0 版本正式发布
  6. python读取txt文件_python实现读写txt文件的几种方法
  7. mysql ssh .net_c# – 使用SSH.NET库与MySQL建立SSH连接
  8. 改变外观_“改”出来的精彩!盘点5种改变葫芦外观的技艺
  9. 保姆级My SQL-5.7.19安装教程
  10. .Net中的事件处理模型
  11. Mybaits 3.2.6设计的一个缺陷,欢迎拍砖交流
  12. zoj 3640 Help Me Escape (概率dp 递归求期望)
  13. 正在启动文档服务器,正在启动远程服务器
  14. MySql学习笔记(六):扫描范围
  15. 图像直方图均衡 matlab,图像直方图均衡化
  16. 计算机组装与维修要学哪些,计算机组装与维修教学基本要求
  17. 非因解读 | Multiplex immunofluorescnece-多重免疫荧光结合单细胞蛋白组技术探索肿瘤微环境
  18. 基于Wiki的知识共享平台模型架构
  19. 中国石油大学《微观经济学》第一次在线作业
  20. 2022年考研计算机组成原理_4 指令系统

热门文章

  1. Java 11 将至,不妨了解一下 Oracle JDK 之外的版本
  2. 快来了解下Snappy Ubuntu是什么
  3. Android 多模块项目入门
  4. RobotLegs框架解析
  5. 问题以及发现问题和解决问题
  6. 开源软件 Cachet 被曝RCE漏洞
  7. 不小心发现谷歌 Firebase 消息服务的漏洞,获奖3万+美元
  8. spring boot 2.0.3+spring cloud (Finchley)6、配置中心Spring Cloud Config
  9. 北京正研究“车路协同”模式,将打造自动驾驶测试专用道路
  10. 2016打算做运维的人员必知必晓的知识