类的使用
cn.dev33.satoken.strategy.SaStrategy
使用SaStrategy的程序包
-
cn.dev33.satoken.strategy中SaStrategy的使用
修饰符和类型方法说明SaStrategy.setCheckElementAnnotation(Consumer<AnnotatedElement> checkElementAnnotation) 对一个 [元素] 对象进行注解校验 (注解鉴权内部实现)SaStrategy.setCheckMethodAnnotation(Consumer<Method> checkMethodAnnotation) 对一个 [Method] 对象进行注解校验 (注解鉴权内部实现)SaStrategy.setCreateSession(Function<String, SaSession> createSession) 重写创建 Session 的策略SaStrategy.setCreateToken(BiFunction<Object, String, String> createToken) 重写创建 Token 的策略SaStrategy.setGetAnnotation(BiFunction<AnnotatedElement, Class<? extends Annotation>, Annotation> getAnnotation) 从元素上获取注解SaStrategy.setHasElement(BiFunction<List<String>, String, Boolean> hasElement) 判断:集合中是否包含指定元素(模糊匹配)SaStrategy.setIsAnnotationPresent(BiFunction<Method, Class<? extends Annotation>, Boolean> isAnnotationPresent) 判断一个 Method 或其所属 Class 是否包含指定注解