RequestAttributes requestAttributes = RequestContextHolder.currentRequestAttributes();
                                      RequestContextHolder.getRequestAttributes();
        //从session里面获取对应的值
        String str = (String) requestAttributes.getAttribute("name",RequestAttributes.SCOPE_SESSION);

        HttpServletRequest request = ((ServletRequestAttributes)requestAttributes).getRequest();
        HttpServletResponse response = ((ServletRequestAttributes)requestAttributes).getResponse();