code: @RequestMapping(method = RequestMethod.POST)
      protected final void process(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
          if (isLegal(request)) {
              String result = processRequest(request);
              //设置正确的 content-type 以防止中文乱码
              response.setContentType("text/xml;charset=UTF-8");
              PrintWriter writer = response.getWriter();
              writer.write(result);
              writer.close();
          }
      }
docs: 微信消息交互处理
  
  @param request http 请求对象
  @param response http 响应对象
  @throws ServletException 异常
  @throws IOException      IO异常