feat: sa-token-quick-login 支持 SpringBoot3 项目。 Closes #IAFQNE。fix: #673

This commit is contained in:
click33
2025-03-14 19:48:45 +08:00
parent a01eef8000
commit 5b5c031bdd
13 changed files with 252 additions and 38 deletions

View File

@@ -37,6 +37,8 @@ import cn.dev33.satoken.stp.StpInterface;
import cn.dev33.satoken.stp.StpLogic;
import cn.dev33.satoken.stp.StpUtil;
import cn.dev33.satoken.strategy.SaAnnotationStrategy;
import cn.dev33.satoken.strategy.SaFirewallStrategy;
import cn.dev33.satoken.strategy.hooks.SaFirewallCheckHook;
import cn.dev33.satoken.temp.SaTempInterface;
import org.noear.solon.annotation.Bean;
import org.noear.solon.annotation.Condition;
@@ -236,4 +238,16 @@ public class SaBeanInject {
StpUtil.setStpLogic(stpLogic);
}
/**
* 注入自定义防火墙校验 hook 集合
*
* @param hooks /
*/
@Bean
public void setSaFirewallCheckHooks(List<SaFirewallCheckHook> hooks) {
for (SaFirewallCheckHook hook : hooks) {
SaFirewallStrategy.instance.registerHook(hook);
}
}
}

View File

@@ -30,7 +30,7 @@ import java.util.Arrays;
import java.util.List;
/**
* Servlet 全局鉴权过滤器
* Jakarta-Servlet 全局鉴权过滤器
* <p>
* 默认优先级为 -100尽量保证在其它过滤器之前执行
* </p>