mirror of
https://gitee.com/dromara/sa-token.git
synced 2025-10-07 23:24:24 +08:00
feat: sa-token-quick-login 支持 SpringBoot3 项目。 Closes #IAFQNE。fix: #673
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -30,7 +30,7 @@ import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Servlet 全局鉴权过滤器
|
||||
* Jakarta-Servlet 全局鉴权过滤器
|
||||
* <p>
|
||||
* 默认优先级为 -100,尽量保证在其它过滤器之前执行
|
||||
* </p>
|
||||
|
Reference in New Issue
Block a user