Subject currentUser = SecurityUtils.getSubject(); Session session = currentUser.getSession(); session.setAttribute("someKey", someValue);
可以通过与当前执行的Subject 交互来获取Session;