From 4f9f6a63ecdd3406c5e1f4db86232717824f469b Mon Sep 17 00:00:00 2001 From: wu <731351411@qq.com> Date: 星期五, 01 十二月 2023 16:38:30 +0800 Subject: [PATCH] 更新测试后的理片逻辑 --- springboot-vue3/src/main/java/com/example/springboot/security/StatelessDefaultSubjectFactory.java | 14 ++++++++++++++ 1 files changed, 14 insertions(+), 0 deletions(-) diff --git a/springboot-vue3/src/main/java/com/example/springboot/security/StatelessDefaultSubjectFactory.java b/springboot-vue3/src/main/java/com/example/springboot/security/StatelessDefaultSubjectFactory.java new file mode 100644 index 0000000..c9970be --- /dev/null +++ b/springboot-vue3/src/main/java/com/example/springboot/security/StatelessDefaultSubjectFactory.java @@ -0,0 +1,14 @@ +package com.example.springboot.security; + +import org.apache.shiro.subject.Subject; +import org.apache.shiro.subject.SubjectContext; +import org.apache.shiro.web.mgt.DefaultWebSubjectFactory; + +public class StatelessDefaultSubjectFactory extends DefaultWebSubjectFactory { + @Override + public Subject createSubject(SubjectContext context) { + //涓嶅垱寤簊ession + context.setSessionCreationEnabled(false); + return super.createSubject(context); + } +} -- Gitblit v1.8.0