From dc31792dc1b8ad1658e49ba8fce9a1be924e6fbb Mon Sep 17 00:00:00 2001 From: wu <731351411@qq.com> Date: 星期四, 30 十一月 2023 08:44:04 +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