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.out.println("auth.getName():"+auth.getName());
}