public class SaInterceptor extends Object implements org.springframework.web.servlet.HandlerInterceptor
| 限定符和类型 | 字段和说明 |
|---|---|
boolean |
isAnnotation
是否打开注解鉴权,配置为 true 时注解鉴权才会生效,配置为 false 时,即使写了注解也不会进行鉴权
|
| 构造器和说明 |
|---|
SaInterceptor()
创建一个 Sa-Token 综合拦截器,默认带有注解鉴权能力
|
| 限定符和类型 | 方法和说明 |
|---|---|
SaInterceptor |
isAnnotation(boolean isAnnotation)
设置是否打开注解鉴权:配置为 true 时注解鉴权才会生效,配置为 false 时,即使写了注解也不会进行鉴权
|
boolean |
preHandle(@NotNull javax.servlet.http.HttpServletRequest request,
@NotNull javax.servlet.http.HttpServletResponse response,
@NotNull Object handler)
每次请求之前触发的方法
|
public boolean isAnnotation
public SaInterceptor isAnnotation(boolean isAnnotation)
isAnnotation - /public boolean preHandle(@NotNull
@NotNull javax.servlet.http.HttpServletRequest request,
@NotNull
@NotNull javax.servlet.http.HttpServletResponse response,
@NotNull
@NotNull Object handler)
throws Exception
preHandle 在接口中 org.springframework.web.servlet.HandlerInterceptorExceptionCopyright © 2024. All rights reserved.