【Request method 'GET' not supported _SSM 】 | IT修真院·坑乎
咨询电话 : 010-59478634
切换导航
首页
我的提问
我的回答
我的点赞
消息通知
个人主页
×
提示
尚未登陆,前往官网登陆?
×
提示
尚未登陆,前往官网登陆?
Request method 'GET' not supported
我也踩过这个坑(
1
)
已统计您的踩坑,无需重复点击
回答(1)
SSM
详细描述
登录的时候,报错Request method 'GET' not supported,看了一下,用户名和密码都是正确的,配置什么的也没问题。猜测是登录的逻辑写错了,可是看了很多遍,也看不出错误
错误截图
源码
@RequestMapping(value = "/login", method = RequestMethod.POST) public String login(HttpServletResponse response, HttpServletRequest request, @RequestParam("user") String user, @RequestParam("pass") String pass) throws Exception { if (user != null && !user.equals("")) { Count count = countServiceImpl.selectByName(user); if (count.getUser().equals(user)) { if (MD5Util.MD5(pass + count.getUser()).equals(count.getMd5())) { Long db = System.currentTimeMillis(); String df = db.toString(); String tokenz = user + "," + df; String token = EncryUtil.encrypt(tokenz); Cookie cookie = new Cookie("name", token); //cookie.setDomain("www.hanyaohe.top"); cookie.setPath("/"); cookie.setMaxAge(1000 * 60 * 60); response.addCookie(cookie); return "redirect:/u/one"; } } } return "redirect:/login"; }
编辑于2025-04-10
时间排序
热门排序
[西安|荣耀师兄]JAVA-郭靖
0
看一下你的登录页面那里的请求是不是post请求,把那里改一下。
查看全部>
编辑于2018-12-15
首页
1
末页
去第
页
确定
Copyright ©2015 北京葡萄藤信息技术有限公司 All Rights Reserved | 京ICP备15035574号-1
复制链接
新浪微博
微信扫一扫
1331
0
10
Request method 'GET' not supported
1
1