3,143
社区成员
发帖
与我相关
我的任务
分享
@RequestMapping(value = "/getUrl.do", method = RequestMethod.GET)
public String getUrl(Model model,HttpServletRequest request) {
LOG.info("redirect to wx url");
try {
//String ip = request.getLocalAddr();
String redirectUri = "https://***.tunnel.qydev.com/line-service/index.action";
String url = iService.oauth2buildAuthorizationUrl(redirectUri, WxConsts.OAUTH2_SCOPE_USER_INFO, "toindex");
LOG.info("redirect uri:"+url);
//return new ModelAndView("redirect:"+url);
return "redirect:"+url;
} catch (WxErrorException e) {
LOG.error(e.getMessage(), e);
return "redirect:"+url;
}
}