首页 > TAG信息列表 > remoteUser
5.Spring security从当前请求对象中获取登陆用户
@RequestMapping("getUser") public void getUser(HttpServletRequest req){ String remoteUser=req.getRemoteUser(); Authentication auth=(Authentication) req.getUserPrincipal(); System.out.println("remoteUser:"+remoteUser); System.ou