类 SaRouterStaff
java.lang.Object
cn.dev33.satoken.router.SaRouterStaff
路由匹配操作对象
- 作者:
- kong
-
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明back()停止匹配,结束执行,向前端返回结果停止匹配,结束执行,向前端返回结果check(SaFunction fun) 执行校验函数 (无参)执行校验函数 (带参)free(SaParamFunction<SaRouterStaff> fun) 自由匹配 ( 在free作用域里执行stop()不会跳出Auth函数,而是仅仅跳出free代码块 )booleanisHit()match(boolean flag) 根据 boolean 值进行匹配match(SaParamRetFunction<Object, Boolean> fun) 根据自定义方法进行匹配 (lazy)match(SaHttpMethod... methods) Http请求方法匹配 (Enum)路由匹配match(String pattern, SaFunction fun) 路由匹配,如果匹配成功则执行认证函数match(String pattern, SaParamFunction<SaRouterStaff> fun) 路由匹配,如果匹配成功则执行认证函数match(String pattern, String excludePattern, SaFunction fun) 路由匹配 (并指定排除匹配符),如果匹配成功则执行认证函数match(String pattern, String excludePattern, SaParamFunction<SaRouterStaff> fun) 路由匹配 (并指定排除匹配符),如果匹配成功则执行认证函数路由匹配matchMethod(String... methods) Http请求方法匹配 (String)notMatch(boolean flag) 根据 boolean 值进行匹配排除根据自定义方法进行匹配排除 (lazy)notMatch(SaHttpMethod... methods) Http请求方法匹配排除 (Enum)路由匹配排除路由匹配排除notMatchMethod(String... methods) Http请求方法匹配排除 (String)reset()重置命中标记为 truesetHit(boolean isHit) stop()停止匹配,跳出函数 (在多个匹配链中一次性跳出Auth函数)
-
字段详细资料
-
isHit
public boolean isHit是否命中的标记变量
-
-
构造器详细资料
-
SaRouterStaff
public SaRouterStaff()
-
-
方法详细资料
-
isHit
public boolean isHit()- 返回:
- 是否命中
-
setHit
- 参数:
isHit- 命中标记- 返回:
- 对象自身
-
reset
重置命中标记为 true- 返回:
- 对象自身
-
match
路由匹配- 参数:
patterns- 路由匹配符数组- 返回:
- 对象自身
-
notMatch
路由匹配排除- 参数:
patterns- 路由匹配符排除数组- 返回:
- 对象自身
-
match
路由匹配- 参数:
patterns- 路由匹配符集合- 返回:
- 对象自身
-
notMatch
路由匹配排除- 参数:
patterns- 路由匹配符排除集合- 返回:
- 对象自身
-
match
Http请求方法匹配 (Enum)- 参数:
methods- Http请求方法断言数组- 返回:
- 对象自身
-
notMatch
Http请求方法匹配排除 (Enum)- 参数:
methods- Http请求方法断言排除数组- 返回:
- 对象自身
-
matchMethod
Http请求方法匹配 (String)- 参数:
methods- Http请求方法断言数组- 返回:
- 对象自身
-
notMatchMethod
Http请求方法匹配排除 (String)- 参数:
methods- Http请求方法断言排除数组- 返回:
- 对象自身
-
match
根据 boolean 值进行匹配- 参数:
flag- boolean值- 返回:
- 对象自身
-
notMatch
根据 boolean 值进行匹配排除- 参数:
flag- boolean值- 返回:
- 对象自身
-
match
根据自定义方法进行匹配 (lazy)- 参数:
fun- 自定义方法- 返回:
- 对象自身
-
notMatch
根据自定义方法进行匹配排除 (lazy)- 参数:
fun- 自定义排除方法- 返回:
- 对象自身
-
check
执行校验函数 (无参)- 参数:
fun- 要执行的函数- 返回:
- 对象自身
-
check
执行校验函数 (带参)- 参数:
fun- 要执行的函数- 返回:
- 对象自身
-
free
自由匹配 ( 在free作用域里执行stop()不会跳出Auth函数,而是仅仅跳出free代码块 )- 参数:
fun- 要执行的函数- 返回:
- 对象自身
-
match
路由匹配,如果匹配成功则执行认证函数- 参数:
pattern- 路由匹配符fun- 要执行的校验方法- 返回:
- /
-
match
路由匹配,如果匹配成功则执行认证函数- 参数:
pattern- 路由匹配符fun- 要执行的校验方法- 返回:
- /
-
match
路由匹配 (并指定排除匹配符),如果匹配成功则执行认证函数- 参数:
pattern- 路由匹配符excludePattern- 要排除的路由匹配符fun- 要执行的方法- 返回:
- /
-
match
public SaRouterStaff match(String pattern, String excludePattern, SaParamFunction<SaRouterStaff> fun) 路由匹配 (并指定排除匹配符),如果匹配成功则执行认证函数- 参数:
pattern- 路由匹配符excludePattern- 要排除的路由匹配符fun- 要执行的方法- 返回:
- /
-
stop
停止匹配,跳出函数 (在多个匹配链中一次性跳出Auth函数)- 返回:
- 对象自身
-
back
停止匹配,结束执行,向前端返回结果- 返回:
- 对象自身
-
back
停止匹配,结束执行,向前端返回结果- 参数:
result- 要输出的结果- 返回:
- 对象自身
-