shiro 无状态应用报DisabledSessionException?
无状态的web应用在执行到getSubject(request, response).login(statelessToken)时,报以下异常: [org.apache.shiro.subject.support.DisabledSessionException: Session creation has been disabled for the current subject. 部分相关代码如下: 已经禁止创建session: public class StatelessWebSubjectFactory extends DefaultWebSubjectFactory { public Subject createSubject(SubjectContext context) { // 不创建 session,如果之后调用 Subject.getSession()将抛出 DisabledSessionException 异常 context.setSessionCreationEnabled(false); return super.createSubject(context); } } 在程序执行到以下代码时,出现异常: StatelessToken statelessToken = new StatelessToken(user.getEmployeeNo());