微信公众号 验证token

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/zengsange/article/details/78774658
/**
* 测试
* @return
*/

@RequestMapping("test")
public String Test(HttpServletRequest request,HttpServletResponse response){
String signature = request.getParameter("signature");
String timestamp = request.getParameter("timestamp");
        String nonce = request.getParameter("nonce");
        String echostr = request.getParameter("echostr");
        System.out.println("signature:" + signature);
        System.out.println("timestamp:" + timestamp);
        System.out.println("nonce:" + nonce);
        System.out.println("echostr:" + echostr);
        PrintWriter pw;
try {
pw = response.getWriter();
pw.append(echostr);
pw.flush();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}

return null;

}

//TOKEN值为: echostr

//URL  具体到方法

//EncodingAESKey 随机生成


猜你喜欢

转载自blog.csdn.net/zengsange/article/details/78774658