session可以用于请求后端数据共享
private static void flushSession(HttpServletRequest request, UserInfoDO userInfoDO) { String shortName = userInfo.getShortName(); String empId = userInfoDO.getEmpId(); Map<String,Object> principalAttributes = new HashMap<>(); principalAttributes.put(USER_EMP_ID, empId); principalAttributes.put(NOTES_NAME, notesName); AttributePrincipalImpl attributePrincipal = new AttributePrincipalImpl(shortName,principalAttributes); Assertion assertion = new AssertionImpl(attributePrincipal); request.getSession(true).setAttribute(AbstractCasFilter.CONST_CAS_ASSERTION, assertion); }