mirror of
https://gitee.com/dromara/sa-token.git
synced 2026-02-27 16:50:24 +08:00
feat(plugin): 新增 sa-token-spring-el 插件,用于支持 SpEL 表达式注解鉴权
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
* Copyright 2020-2099 sa-token.cc
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package cn.dev33.satoken.fun.strategy;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
/**
|
||||
* 函数式接口:SaCheckELRootMap 扩展函数
|
||||
*
|
||||
* <p> 参数:SaCheckELRootMap 对象 </p>
|
||||
*
|
||||
* @author click33
|
||||
* @since 1.40.0
|
||||
*/
|
||||
@FunctionalInterface
|
||||
public interface SaCheckELRootMapExtendFunction extends Consumer<Map<String, Object>> {
|
||||
|
||||
}
|
||||
@@ -17,6 +17,7 @@ package cn.dev33.satoken.strategy;
|
||||
|
||||
import cn.dev33.satoken.annotation.*;
|
||||
import cn.dev33.satoken.annotation.handler.*;
|
||||
import cn.dev33.satoken.fun.strategy.SaCheckELRootMapExtendFunction;
|
||||
import cn.dev33.satoken.fun.strategy.SaCheckMethodAnnotationFunction;
|
||||
import cn.dev33.satoken.fun.strategy.SaGetAnnotationFunction;
|
||||
import cn.dev33.satoken.fun.strategy.SaIsAnnotationPresentFunction;
|
||||
@@ -130,4 +131,13 @@ public final class SaAnnotationStrategy {
|
||||
instance.getAnnotation.apply(method.getDeclaringClass(), annotationClass) != null;
|
||||
};
|
||||
|
||||
/**
|
||||
* SaCheckELRootMap 扩展函数
|
||||
*/
|
||||
public SaCheckELRootMapExtendFunction checkELRootMapExtendFunction = rootMap -> {
|
||||
// 默认不做任何处理
|
||||
};
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user