日志报错是这个样子
019-05-11 15:55:05.715 [http-nio-80-exec-9] ERROR com.imooc.o2o.util.wechat.WechatUtil - 获取用户信息失败: Unrecognized field "errcode" (class com.imooc.o2o.dto.WechatUser), not marked as ignorable (9 known properties: "province", "privilege", "openid", "sex", "language", "city", "headimgurl", "nickname", "country"])
at [Source: {"errcode":40001,"errmsg":"invalid credential, access_token is invalid or not latest, hints: [ req_id: 2hfclQwFE-fX71KA ]"}; line: 1, column: 17] (through reference chain: com.imooc.o2o.dto.WechatUser["errcode"])
com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "errcode" (class com.imooc.o2o.dto.WechatUser), not marked as ignorable (9 known properties: "province", "privilege", "openid", "sex", "language", "city", "headimgurl", "nickname", "country"])
at [Source: {"errcode":40001,"errmsg":"invalid credential, access_token is invalid or not latest, hints: [ req_id: 2hfclQwFE-fX71KA ]"}; line: 1, column: 17] (through reference chain: com.imooc.o2o.dto.WechatUser["errcode"])
后面还有这两行
at com.imooc.o2o.util.wechat.WechatUtil.getUserInfo(WechatUtil.java:96)
at com.imooc.o2o.web.wechat.WechatLoginController.doGet(WechatLoginController.java:67)
我的问题有三点
为什么我调用https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx27dfbbc5148d2970&redirect_uri=http://39.105.138.125/mvco2o/wechatlogin/logincheck&role_type=1&response_type=code&scope=snsapi_userinfo&state=1#wechat_redirect并且登陆后页面是空白的
为什么我的token验证成功之后 日志显示还是找不到 而且微信获取不到个人信息
为什么我的http://39.105.138.125/mvco2o/frontend/index是这个样子 没有jsp 图片 按钮什么的
最后辛苦老师晚上加班到12点还要解答我们的问题 谢谢老师!
SSM商铺V1.0,解决毕设痛点;SpringBoot商铺V2.0,满足工作刚需
了解课程