路由拦截器 增加参数

This commit is contained in:
shengzhang
2021-01-11 21:18:55 +08:00
parent c3bedaef99
commit c7f3b6d493
4 changed files with 19 additions and 14 deletions

View File

@@ -1,5 +1,8 @@
package cn.dev33.satoken.interceptor;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
* 执行验证方法的辅助类
* @author kong
@@ -10,6 +13,6 @@ public interface SaFunction {
/**
* 执行验证的方法
*/
public void run();
public void run(HttpServletRequest request, HttpServletResponse response, Object handler);
}

View File

@@ -237,7 +237,7 @@ public class SaRouteInterceptor implements HandlerInterceptor {
getStpLogic().checkPermissionOr(codes);
}
} else if(this.type == SaRouteInterceptor.CUSTOM) {
function.run();
function.run(request, response, handler);
}
// 通过验证