-
-
Notifications
You must be signed in to change notification settings - Fork 9k
Closed
Labels
Description
wxMaService.getQrcodeService().createWxCodeLimit(idScene, null)
错误信息
me.chanjar.weixin.common.exception.WxErrorException: {"errcode":47001,"errmsg":"data format error hint: [Ox8o30679wxa6]"}
at cn.binarywang.wx.miniapp.util.http.QrCodeRequestExecutor.execute(QrCodeRequestExecutor.java:52) ~[weixin-java-miniapp-2.9.0.jar:na]
at cn.binarywang.wx.miniapp.util.http.QrCodeRequestExecutor.execute(QrCodeRequestExecutor.java:28) ~[weixin-java-miniapp-2.9.0.jar:na]
at cn.binarywang.wx.miniapp.api.impl.WxMaServiceImpl.executeInternal(WxMaServiceImpl.java:193) ~[weixin-java-miniapp-2.9.0.jar:na]
at cn.binarywang.wx.miniapp.api.impl.WxMaServiceImpl.execute(WxMaServiceImpl.java:156) ~[weixin-java-miniapp-2.9.0.jar:na]
at cn.binarywang.wx.miniapp.api.impl.WxMaQrcodeServiceImpl.createWxCodeLimit(WxMaQrcodeServiceImpl.java:64) ~[weixin-java-miniapp-2.9.0.jar:na]
at cn.binarywang.wx.miniapp.api.impl.WxMaQrcodeServiceImpl.createWxCodeLimit(WxMaQrcodeServiceImpl.java:70) ~[weixin-java-miniapp-2.9.0.jar:na]
跟踪代码发现
cn.binarywang.wx.miniapp.util.http.QrCodeRequestExecutor#execute 43行
设置的entity 为 text/plan, 微信要求的请求是 application/json
httpPost.setEntity(new StringEntity(ticket.toString()));