Class SaTokenConfigure
java.lang.Object
io.github.xezzon.zeroweb.auth.SaTokenConfigure
- All Implemented Interfaces:
org.springframework.web.servlet.config.annotation.WebMvcConfigurer
@Configuration
public class SaTokenConfigure
extends Object
implements org.springframework.web.servlet.config.annotation.WebMvcConfigurer
Sa-Token 配置类。
用于配置 Sa-Token 相关的拦截器,实现注解式鉴权。
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddInterceptors(org.springframework.web.servlet.config.annotation.InterceptorRegistry registry) 添加 Sa-Token 拦截器到 Spring MVC 的拦截器注册表。Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.web.servlet.config.annotation.WebMvcConfigurer
addArgumentResolvers, addCorsMappings, addErrorResponseInterceptors, addFormatters, addResourceHandlers, addReturnValueHandlers, addViewControllers, configureApiVersioning, configureAsyncSupport, configureContentNegotiation, configureDefaultServletHandling, configureHandlerExceptionResolvers, configureMessageConverters, configureMessageConverters, configurePathMatch, configureViewResolvers, extendHandlerExceptionResolvers, extendMessageConverters, getMessageCodesResolver, getValidator
-
Constructor Details
-
SaTokenConfigure
public SaTokenConfigure()
-
-
Method Details
-
addInterceptors
public void addInterceptors(org.springframework.web.servlet.config.annotation.InterceptorRegistry registry) 添加 Sa-Token 拦截器到 Spring MVC 的拦截器注册表。 实现对所有路径进行注解式鉴权的功能。- Specified by:
addInterceptorsin interfaceorg.springframework.web.servlet.config.annotation.WebMvcConfigurer- Parameters:
registry- Spring MVC 拦截器注册表
-