public class SaRouteInterceptor
extends java.lang.Object
implements org.springframework.web.servlet.HandlerInterceptor
| 限定符和类型 | 字段和说明 |
|---|---|
SaRouteFunction |
function
每次进入拦截器的[执行函数],默认为登录校验
|
| 构造器和说明 |
|---|
SaRouteInterceptor()
创建一个路由拦截器
|
SaRouteInterceptor(SaRouteFunction function)
创建, 并指定[执行函数]
|
| 限定符和类型 | 方法和说明 |
|---|---|
static SaRouteInterceptor |
newInstance(SaRouteFunction function)
静态方法快速构建一个
|
boolean |
preHandle(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
java.lang.Object handler)
每次请求之前触发的方法
|
public SaRouteFunction function
public SaRouteInterceptor()
public SaRouteInterceptor(SaRouteFunction function)
function - [执行函数]public static SaRouteInterceptor newInstance(SaRouteFunction function)
function - 自定义模式下的执行函数public boolean preHandle(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
java.lang.Object handler)
throws java.lang.Exception
preHandle 在接口中 org.springframework.web.servlet.HandlerInterceptorjava.lang.ExceptionCopyright © 2022. All Rights Reserved.