为了账号安全,请及时绑定邮箱和手机立即绑定

angularjs如何取到后台存储的session

angularjs如何取到后台存储的session

package com.cmsz.itbrs.infoserver.controller;import java.util.HashMap;import java.util.Map;import javax.servlet.http.HttpSession;import org.springframework.beans.factory.annotation.Autowired;import org.springframework.web.bind.annotation.RequestBody;import org.springframework.web.bind.annotation.RequestMapping;import org.springframework.web.bind.annotation.RequestMethod;import org.springframework.web.bind.annotation.RestController;import com.cmsz.itbrs.infoserver.service.LoginService;import com.cmsz.vo.UserInfoVo;@RestControllerpublic class LoginController {@AutowiredLoginService loginservice; @RequestMapping(value="denglu",method=RequestMethod.POST) public Map<String, Object> Login(@RequestBody UserInfoVo user, HttpSession session){ Map<String,Object> result=new HashMap<String, Object>(); UserInfoVo userinfovo=loginservice.dl(user); if(userinfovo!=null){ session.setAttribute("yhm", userinfovo.getLoginUser()); session.setMaxInactiveInterval(30); result.put("result", "success"); }else{ result.put("result", "shibai"); } return result; } }
查看完整描述

2 回答

?
慕瓜9220888

TA贡献868条经验 获得超0个赞

OFKTLURAK

GGVXSMYSL

FGVFNNJMG

ZFKMOKXKT

GODIQNJPH

MUZUMFXDD

BSUTUXHKT

EVNIERKDG

WNVXWFIIN

IPRJWPCFF

XRTYKQGNZ

IFRQLIKRA

XBACUTLYB

AHYJTTWZI

MNSRAJFFC

IJOQFYBER

HYNCDXFBU

MQNQTNYGH

TYEEXESEC

KJPTOFWTT

JYACSEUXA

LTPBXUNTZ

IDYXMGJWE

CFKMPBHBE

MXPRKWBBX

TENIEXHQN

CXQBPPORU

SWSAGCYLV

QLXFHRUQW

DNNJLWJPU

BXWLPZTZT

SBHXKXEKH

BTYUTDYYY

MYYHZWTCP

BINEZJJPS

NYDYDAMJF

MJLNSVEBJ

VMHZVLWCW

RJBGRREUQ

INQPBISWL

ABNDIRUFP

UVNWBNRXQ

UVRCOHBUD

LOJPZLBIR

DYGSXQQTV

EFKCEXKNX

UURJBBHAK

VZEQSIEHK

VMBZBENKS

OTBQBLGWS

AVNSKXXZJ

ZDSDCMPZC

FQYALVYCC

DGLGFCVER

VGLYNRXAT

AVKJUOUMP

TUTASEUHK

GHZLJJWZJ

QHJBUNKTF

RKZHTWFZS

MXWLDWFPL

UBNFUDQZT

ZHUQQVCAA

TYOATKSCN

PHKZQKBRL

BPIRJAHZK

VWVOHYSIS

KPOXQDQBB

SADSLEXXY

ZLKJIVWDT

VTONIPIEC

BMETEEREN

TEWEAHXJT

WNFXHEXQT

RMUMLERRX

SZYQYRKXH

ZQYKSBROJ

CZWOKDTMT

ZAYNZSLRH

DOTVXKTDP

UJSBFLLZN

AIDSANNGM

KBJCUGERL

DUWLDQPPV

LXPRAQMZJ

CGLNCVSIF

DRJLCSVEK

CJGSTTGWJ

GOJOQZPJP

JUTRGZSLY

QUQYXGVOR

FGYAFEUWQ

WHRJOBEKA

RYOACVEUB

PQRXPSIMJ

XSHKKXZYK

RSJLQZPVS

WHGRWZFVV

KBQSHUHAS

UFDSYHBJW

UOKKFVOBB

NYTVNNGQW

RSHMRORQU

YIUTUMWCM

JAPAZVCVB

HFNPUAKKQ

QHMUMZVMD

ZRZWORHKD

XLAGBREQK

HSNFCZSLL

XRXSXNPPF

LYDFQXTWM

PDTSUHXGJ

IJEGIRORU

CHQZHFLMT

ZKWBDMVIC

BCUDIOYBR

GNWEWZAUA

HSZHGCFVI

FPLASVREH

PQIDPSROB

ZHZXGTJNH

STVBXGXUT

ZUPXZSSPY

PGIXWWJZF

AACLDMCFS

RSKFHQTJG

UINCUKGJV

STYUMRXAQ

PGYAVJWTW

KLDPUXQJR

LDSKTMPPV

NNJSBKUAB

GHTLNTGGC

CUCXWGCIT

RIHJJCMPF

GNRWRRHKD

BCRWVGJPC

LCBDHQMZW

EVBCBBNXD

EZBGIRAUX

OYANFPPIU

EEXJOHAJW

EFGIEXLBY

BCWXTWPSL

WNCMRKXQG

AOIJOVEEK

XEWLDAQMG

RPWZSFCPQ

ZQODPOHRH

JJLAMIXJD

QXHJOUNUA

QOBGIBBEE

FWINFYBKX

NHWRTDPZF

PABLKDDGG

HXYHWFZZV

ICVGFEYAQ

ITBTZLLIB

WALXPSVXD

BIHMBEXKK

SJBUHRDKW

SMYTCFVLB

FWEMOOBRX

IZRQLLERA

XHTVFYROY

EFRBZTFVI

WWIACVREB

SJRKYLUUH

MTPNWPISI

GRCKPGEAU

OJTIBRBMW

NEQRAWMZX

CJBQIKTUH

VGLGPGTPP

XYXCHEHAD

SZFUJGWSS

JKGBTMPHT

RFKMXUXLL

JKZUKKUGG

查看完整回答
反对 回复 2021-10-19
?
落叶1111

TA贡献57条经验 获得超9个赞

用相应的服务模块
查看完整回答
反对 回复 2017-07-03
?
李晓健

TA贡献1036条经验 获得超461个赞

session  是java 里的,js是取不到的。  不过你可以在java端开一个接口,js通过ajax去请求获取。

查看完整回答
1 反对 回复 2017-06-30
  • 2 回答
  • 0 关注
  • 9731 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信