微信公众号服务号开发中服务器配置

微信公众号服务号开发中服务器配置
参考见:http://www.qchcloud.cn/tn/article/31

微信公众号服务号开发中服务器配置:

微信开发中所有服务器配置是以get请求请求你所配置的服务器的地址。

@ResponseBody
@RequestMapping(value = "api/wx/callback", method = RequestMethod.GET)
public void callback(HttpServletRequest request, HttpServletResponse response) {
    try {
        request.setCharacterEncoding("UTF-8");
    response.setCharacterEncoding("UTF-8");
    // 开发者提交信息后,微信服务器将发送GET请求到填写的服务器地址URL上,GET请求携带参数
    String signature = request.getParameter("signature");// 微信加密签名(token、timestamp、nonce。)
    String timestamp = request.getParameter("timestamp");// 时间戳
    String nonce = request.getParameter("nonce");// 随机数
    String echostr = request.getParameter("echostr");// 随机字符串
    //PrintWriter out = response.getWriter();
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章