mirror of
https://gitee.com/dromara/sa-token.git
synced 2026-02-27 16:50:24 +08:00
v1.12.1更新
This commit is contained in:
@@ -35,6 +35,7 @@ public class SaAnnotationInterceptor implements HandlerInterceptor {
|
||||
|
||||
/**
|
||||
* @param stpLogic 底层的 StpLogic 对象
|
||||
* @return 拦截器自身
|
||||
*/
|
||||
public SaAnnotationInterceptor setStpLogic(StpLogic stpLogic) {
|
||||
this.stpLogic = stpLogic;
|
||||
@@ -45,7 +46,7 @@ public class SaAnnotationInterceptor implements HandlerInterceptor {
|
||||
/**
|
||||
* 创建,并指定一个默认的 StpLogic
|
||||
*/
|
||||
public SaAnnotationInterceptor() {
|
||||
public SaAnnotationInterceptor() {
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -12,6 +12,9 @@ public interface SaRouteFunction {
|
||||
|
||||
/**
|
||||
* 执行验证的方法
|
||||
* @param request request对象
|
||||
* @param response response对象
|
||||
* @param handler 处理对象
|
||||
*/
|
||||
public void run(HttpServletRequest request, HttpServletResponse response, Object handler);
|
||||
|
||||
|
||||
@@ -78,6 +78,7 @@ public class SaRouteInterceptor implements HandlerInterceptor {
|
||||
|
||||
/**
|
||||
* @param stpLogic 底层的 StpLogic 对象
|
||||
* @return 拦截器自身
|
||||
*/
|
||||
public SaRouteInterceptor setStpLogic(StpLogic stpLogic) {
|
||||
this.stpLogic = stpLogic;
|
||||
@@ -93,6 +94,7 @@ public class SaRouteInterceptor implements HandlerInterceptor {
|
||||
|
||||
/**
|
||||
* @param type 验证类型 (1=登录验证, 2=角色验证, 3=权限验证, 4=自定义验证)
|
||||
* @return 拦截器自身
|
||||
*/
|
||||
public SaRouteInterceptor setType(int type) {
|
||||
this.type = type;
|
||||
@@ -108,6 +110,7 @@ public class SaRouteInterceptor implements HandlerInterceptor {
|
||||
|
||||
/**
|
||||
* @param mode 验证模式 AND | OR
|
||||
* @return 拦截器自身
|
||||
*/
|
||||
public SaRouteInterceptor setMode(SaMode mode) {
|
||||
this.mode = mode;
|
||||
@@ -123,6 +126,7 @@ public class SaRouteInterceptor implements HandlerInterceptor {
|
||||
|
||||
/**
|
||||
* @param codes 标识码数组
|
||||
* @return 拦截器自身
|
||||
*/
|
||||
public SaRouteInterceptor setCodes(String... codes) {
|
||||
this.codes = codes;
|
||||
@@ -138,6 +142,7 @@ public class SaRouteInterceptor implements HandlerInterceptor {
|
||||
|
||||
/**
|
||||
* @param function 设置自定义模式下的执行函数
|
||||
* @return 拦截器自身
|
||||
*/
|
||||
public SaRouteInterceptor setFunction(SaRouteFunction function) {
|
||||
this.type = SaRouteInterceptor.CUSTOM;
|
||||
|
||||
@@ -61,7 +61,7 @@ public class SaRouterUtil {
|
||||
|
||||
/**
|
||||
* 校验指定路由匹配符是否可以匹配成功指定路径
|
||||
* @param pattern 路由匹配符
|
||||
* @param patterns 路由匹配符
|
||||
* @param path 需要匹配的路径集合
|
||||
* @return 是否匹配成功
|
||||
*/
|
||||
@@ -85,7 +85,7 @@ public class SaRouterUtil {
|
||||
|
||||
/**
|
||||
* 校验指定路由匹配符是否可以匹配成功当前URI
|
||||
* @param pattern 路由匹配符
|
||||
* @param patterns 路由匹配符
|
||||
* @return 是否匹配成功
|
||||
*/
|
||||
public static boolean isMatchCurrURI(List<String> patterns) {
|
||||
|
||||
Reference in New Issue
Block a user