package com.xxh.cloud.frontend.config; import org.springframework.context.annotation.Configuration; import org.springframework.web.method.support.HandlerMethodArgumentResolver; import org.springframework.web.servlet.config.annotation.InterceptorRegistry; import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; import java.util.List; @Configuration public class WebMvcConfig implements WebMvcConfigurer { /** * Spring的拦截器配置 * */ @Override public void addInterceptors(InterceptorRegistry registry) { // 权限注解拦截器 System.out.println("----------------权限注解拦截器-------------------------"); // registry.addInterceptor(new AuthorizationAnnotationInterceptor(redisUtils)); } /** * controller请求扩展点配置 * */ @Override public void addArgumentResolvers(List argumentResolvers) { //@LoginUser配置 System.out.println("----------------LoginUser配置-------------------------"); // argumentResolvers.add(new LoginUserHandlerMethodArgumentResolver(false)); } }