@At({"/getUser","/getUser/?"})
@Fail("http:200")
@Filters({@By(type = UserFilter.class)})
public void getUser(String key,HttpServletRequest req) throws IOException {
/*String code = req.getParameter("code");
Wx_config appInfo = wxConfigService.fetch(Cnd.where("id", "=", key));
String strings = "";
try {
strings = HttpUtil.sendPost("https://api.weixin.qq.com/sns/oauth2/access_token", "appid="+appInfo.getAppid()+"&secret="+appInfo.getAppsecret()+"&code="+code+"&grant_type=authorization_code");
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
} */
System.out.println("111111111111111111111111111111");
}
https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxb4177e49ba85894c&redirect_uri=http://1037424761.ngrok.wendal.cn/clouds/open/weixin/getUser/bb45db545d8f4330a7fe633f31b0f446&response_type=code&scope=snsapi_base&state=123456#wechat_redirect
微信的权限认证url,我要做一个拦截处理,需要获得appId,还有“code”值
原本 public void getUser(String key,HttpServletRequest req) throws IOException 中的key就是我传的appid,但是在拦截器中,我不知道该怎么获得?
@wendal