mirror of
https://gitee.com/dromara/sa-token.git
synced 2025-10-21 11:07:23 +08:00
Sa-Token 监听器实现
This commit is contained in:
@@ -8,6 +8,7 @@ import org.springframework.util.PathMatcher;
|
||||
|
||||
import cn.dev33.satoken.SaTokenManager;
|
||||
import cn.dev33.satoken.action.SaTokenAction;
|
||||
import cn.dev33.satoken.aop.SaTokenListener;
|
||||
import cn.dev33.satoken.config.SaTokenConfig;
|
||||
import cn.dev33.satoken.context.SaTokenContext;
|
||||
import cn.dev33.satoken.context.SaTokenContextForThreadLocal;
|
||||
@@ -102,6 +103,15 @@ public class SaTokenSpringAutowired {
|
||||
SaTokenManager.setSaTokenContext(saTokenContext);
|
||||
}
|
||||
|
||||
/**
|
||||
* 注入监听器Bean
|
||||
*
|
||||
* @param saTokenListener saTokenListener对象
|
||||
*/
|
||||
@Autowired(required = false)
|
||||
public void setSaTokenListener(SaTokenListener saTokenListener) {
|
||||
SaTokenManager.setSaTokenListener(saTokenListener);
|
||||
}
|
||||
/**
|
||||
* 利用自动匹配特性,获取SpringMVC框架内部使用的路由匹配器
|
||||
*
|
||||
|
Reference in New Issue
Block a user