最近中文字幕高清中文字幕无,亚洲欧美高清一区二区三区,一本色道无码道dvd在线观看 ,一个人看的www免费高清中文字幕

為了賬號安全,請及時綁定郵箱和手機(jī)立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

ssm整合shiro時出現(xiàn)錯誤,求解!在線等!

ssm整合shiro時出現(xiàn)錯誤,求解!在線等!

報錯:還沒登錄,SecurityUtils.getSubject().isAuthenticated()為什么是ture,他得知應(yīng)該是false才對呀 @RequestMapping(value = "login.do", method = RequestMethod.POST) @ResponseBody public ModelMap login() throws Exception { logger.info("進(jìn)入了userController"); String username = request.getParameter("username"); String password = request.getParameter("password"); String verifycode = request.getParameter("code"); String sessioncode = (String) SecurityUtils.getSubject().getSession().getAttribute("code"); logger.info("接收的信息:" + username + password + verifycode + sessioncode); ModelMap parmars = new ModelMap(); UsernamePasswordToken token = new UsernamePasswordToken(username, password); logger.info(token.toString()+"接收令牌"); Subject subject = SecurityUtils.getSubject(); logger.info(subject.getPrincipal()+"獲取登陸者"); try{ if (verifycode.equalsIgnoreCase(sessioncode)) { System.out.println(subject.isAuthenticated()+"-------------"); //判斷身份是否進(jìn)行登錄驗證 if (!subject.isAuthenticated()) { token.setRememberMe(true); subject.login(token); logger.info(token.getUsername() + "登錄成功"); parmars.put("code", Code.SUCCESS); } else { parmars.put("code", Code.ISREMEMBERED); } } else { parmars.put("code", Code.CODE_WRONG); } } catch (Exception e) { e.printStackTrace(); parmars.put("code", Code.UNKOWN_WRONG); logger.info("shiro導(dǎo)致的系統(tǒng)錯誤"); } return parmars; }
查看完整描述

1 回答

?
慕粉4075985

TA貢獻(xiàn)104條經(jīng)驗 獲得超33個贊

之前登錄過,被remember

查看完整回答
反對 回復(fù) 2017-01-04
  • 1 回答
  • 0 關(guān)注
  • 2513 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號