protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { // TODO Auto-generated method stub super.doGet(req, resp); String signature=req.getParameter("signature"); String timestamp=req.getParameter("timestamp"); String nonce=req.getParameter("nonce"); String echostr=req.getParameter("echostr"); PrintWriter out=resp.getWriter(); if(CheckUtil.checkSignature(signature, timestamp, nonce)) { out.println(echostr); } }
谢谢,找到错误了,那里多了个 super.doGet(req, resp);
先看下 url配置正确吗 如果正确能进入到这个方法 那就是CheckUtil.checkSignature(signature, timestamp, nonce)验证方法里面有问题
你检查下验证方法是不是按官方文档去写的