• 请不要在回答技术问题时复制粘贴 AI 生成的内容
yuan434356430
V2EX  ›  程序员

求问一个接口有多种不同格式的 xml 请求,如何统一转换保证不乱码

  •  
  •   yuan434356430 · Oct 10, 2020 · 1546 views
    This topic created in 2048 days ago, the information mentioned may be changed or developed.

    @RequestMapping(value = "/importInfo", method = RequestMethod.POST) public void inportXml(HttpServletRequest request, HttpServletResponse response) {} 请求格式目前有 GBK,GB2312,UTF-8

    THESDZ
        1
    THESDZ  
       Oct 10, 2020
    从请求中获取编码格式,然后适配
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2999 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 46ms · UTC 12:24 · PVG 20:24 · LAX 05:24 · JFK 08:24
    ♥ Do have faith in what you're doing.