sell.com访问报500
来源:16-5 授权2
悲伤的浪漫
2019-06-22
浏览区输入sell.com后直接跳到500页面
但是复制name后面的地址可以跳转到请在微信端打开的页面 ,controller层我已经把注解换成了@controller
2回答
-
悲伤的浪漫
提问者
2019-06-25
@GetMapping("/authorize")
public String authorize(@RequestParam("returnUrl") String returnUrl){
//配置
//调用方法
String url="http://zhangqs.natapp1.cc/sell/wechat/userInfo";
String redirectUrl = wxMpService.oauth2buildAuthorizationUrl(url, WxConsts.OAUTH2_SCOPE_BASE, URLEncoder.encode(returnUrl));
return "redirect:"+redirectUrl;
}这是authorize debug能获取到yml中appid和AppSecret 这个没问题 redirect地址就是页面上这个问题了
2019-06-25 20:10:10,980-Servlet.service() for servlet [dispatcherServlet] in context with path [/sell] threw exception [Could not resolve view with name 'redirect:https://open.weixin.qq.com/connect/oauth2/authorize?appid=null&redirect_uri=http%3A%2F%2Fzhangqs.natapp1.cc%2Fsell%2Fwechat%2FuserInfo&response_type=code&scope=snsapi_base&state=www.imooc.com#wechat_redirect' in servlet with name 'dispatcherServlet'] with root cause
javax.servlet.ServletException: Could not resolve view with name 'redirect:https://open.weixin.qq.com/connect/oauth2/authorize?appid=null&redirect_uri=http%3A%2F%2Fzhangqs.natapp1.cc%2Fsell%2Fwechat%2FuserInfo&response_type=code&scope=snsapi_base&state=www.imooc.com#wechat_redirect' in servlet with name 'dispatcherServlet'
at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1266)
at org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1041)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:984)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:901)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:861)
这个是控制台的报错,麻烦师兄看看 帮忙分析一下什么原因
042019-06-28 -
廖师兄
2019-06-24
你的代码是怎么写的
00
相似问题