InterceptorConfig.java 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. //package com.fdkankan.scene.config;
  2. //
  3. //import com.fdkankan.scene.Interceptor.TokenInterceptor;
  4. //import org.springframework.beans.factory.annotation.Autowired;
  5. //import org.springframework.context.annotation.Configuration;
  6. //import org.springframework.web.servlet.config.annotation.CorsRegistry;
  7. //import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
  8. //import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
  9. //import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
  10. //
  11. //
  12. //@Configuration
  13. //public class InterceptorConfig implements WebMvcConfigurer {
  14. //
  15. // @Autowired
  16. // private TokenInterceptor tokenInterceptor;
  17. //
  18. //// @Override
  19. //// public void addCorsMappings(CorsRegistry registry) {
  20. //// registry.addMapping("/**").allowCredentials(true).allowedHeaders("*").allowedOrigins("*").allowedMethods("*");
  21. ////
  22. //// }
  23. //
  24. // @Override
  25. // public void addInterceptors(InterceptorRegistry registry) {
  26. // registry.addInterceptor(tokenInterceptor).addPathPatterns("/service/scene/edit/**");
  27. //// .excludePathPatterns("/**/sso/**","/app/**","/test/**","/**/inner/**")
  28. //
  29. // WebMvcConfigurer.super.addInterceptors(registry);
  30. // }
  31. //
  32. // @Override
  33. // public void addResourceHandlers(ResourceHandlerRegistry registry) {
  34. // WebMvcConfigurer.super.addResourceHandlers(registry);
  35. // }
  36. //
  37. //}
  38. //