微信测试公众号配置问题“errcode“:-106token check fail“

测试号配置服务器地址问题

直接上图
在这里插入图片描述

java后台代码

@RequestMapping(value="/callback",method={RequestMethod.GET,RequestMethod.POST} )
    public String init(HttpServletRequest request, HttpServletResponse response) {

        log.info("================================微信URL回调测试=========================");
        SAXReader saxReader = new SAXReader();
        Document document;
        try {
            try {
                String nonce = request.getParameter("nonce");
                String timestamp = request.getParameter("timestamp");
                String signature = request.getParameter("signature");
                //需要把微信参数返回去,要不然就会失败
                String echoStr = request.getParameter("echostr");
                log.info("FromUserName===" );
                return echoStr;
            } catch (Exception e) {
                e.printStackTrace();
            }

        } catch (Exception e) {
            e.printStackTrace();
        }
        return "";
    }
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值