WebMvcConfig.java 1.1 KB

1234567891011121314151617181920212223242526272829303132
  1. package com.xxh.cloud.frontend.config;
  2. import org.springframework.context.annotation.Configuration;
  3. import org.springframework.web.method.support.HandlerMethodArgumentResolver;
  4. import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
  5. import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
  6. import java.util.List;
  7. @Configuration
  8. public class WebMvcConfig implements WebMvcConfigurer {
  9. /**
  10. * Spring的拦截器配置
  11. * */
  12. @Override
  13. public void addInterceptors(InterceptorRegistry registry) {
  14. // 权限注解拦截器
  15. System.out.println("----------------权限注解拦截器-------------------------");
  16. // registry.addInterceptor(new AuthorizationAnnotationInterceptor(redisUtils));
  17. }
  18. /**
  19. * controller请求扩展点配置
  20. * */
  21. @Override
  22. public void addArgumentResolvers(List<HandlerMethodArgumentResolver> argumentResolvers) {
  23. //@LoginUser配置
  24. System.out.println("----------------LoginUser配置-------------------------");
  25. // argumentResolvers.add(new LoginUserHandlerMethodArgumentResolver(false));
  26. }
  27. }