System.out.println("shiro:"+ subject.getSession().getId());
System.out.println(" "+ request.getSession().getId());
运行结果:
而且
subject.getSession() == request.getSession() 为false
但是subject.getSession().setAttribute("key","value")后
能从request的Session中取值